Recommendations in Dynamics 365

After I finished presenting my session “Workflows still Rock!” at the Dynamics 365 Saturday in Portland, OR, I had some time left to answer questions and talk about other Dynamics 365 features. I asked the audience if they have heard of the recommendations feature in business rules that was added to the application a few years earlier, and to my surprise most people hadn’t heard of this little gem so I decided to write an article about it.

What are recommendations?
A recommendation is an action that is available in business rules. It allows the system to make a recommendation to the user, based on data entered in a form. When the conditions are met, a small blue light bulb icon will show next to the field the recommendation has been configured for, which the end user can click on. When the icon is clicked, a text box with the recommendation will become visible for the user which he/she can apply or ignore. Combining recommendations with other configuration tools, such as workflows or Power Automate gives system administrators a lot of flexibility. Think about a recommendation that asks the user if they want the system to create a follow up task 3 days before the customer’s decision date. The combination of business rules recommendations, Power Automate and workflows can accomplish these types of automation.

Scenario
In my example I’m going to configure a business rule with a recommendation action on the opportunity entity. The recommendation will shows a discount percentage for an opportunity. The recommended discount percentage is selected based on the value of the estimated revenue field:

– Est Revenue=<1000 and >0: Recommendation: 5% discount
– Est. Revenue Between 1001-5000: Recommendation: 10% discount
– Est. Revenue 25000 or more: Recommendation: 20% discount

When the user clicks the blue ‘apply’ button, the business rule will populate the recommended discount percentage in the ‘discountpercentage’ field. I have made the discountpercentage field on the opportunity form read only, so users can’t manually type in a discount percentage. Keep in mind that this means you need to have the same discountpercentage field on the opportunity twice: the second field will be hidden and not configured as read-only so the business rule recommendation can enter data in that field.

Configuration
After the discountpercentage field has been added to the opportunity form twice (once as a read only field and once as a hidden field) we’re going to create the business rule. I would recommend (no pun intended) to create a new solution for this where you can save your configurations.
Open the solution file by clicking on the gear on the top right and selecting ‘Advanced Settings’, then go to settings > solutions and create a new solution. If you’re not using a new solution you can navigate to settings > customizations > customize the system, which will open the default solution file. Once the solution is open, expand the entities by clicking on the chevron on the left side. Scroll down to opportunities and expand the entity by clicking on the chevron on the left of the opportunity entity. Click on ‘Business Rules’, click the ‘New” icon on the mini ribbon. Make sure you give it a descriptive rule, I used ‘Recommendation: Discount(%)’ so I can easily identify the business rule. Set the scope of the business rule on the top right. (Make sure all the forms that are enabled for this business rule have the ‘discountpercentage’ field on the form, otherwise the rule won’t work properly’)

Business Rule Configuration

Est Revenue=<1000 and >0: Recommendation: 5% discount
In the first condition we want to make sure the dollar amount in the ‘Est. Revenue’ field is between $1-$1,001: In the first rule, select ‘entity’ as the source, select ‘Est. Revenue’ as the field, select ‘Is less than or equal to’ as the operator, select ‘Value’ as the type and ‘1,000’ as the value. Click on the blue ‘+New’ icon in the rule window to add a second condition.
For the second rule, select ‘entity’ as the source, then select ‘Is greater than’ as the operator, select ‘Value’ as the type and ‘0’ as the value. The rule logic should be ‘And’ because we want both conditions to be true. Click the blue apply button on the bottom right.
Click on components and drag the ‘Recommendations’ action next to the condition you just configured. In the recommendation name, you can enter a short description. I entered =<1,000 – 5% discount. ‘Opportunity’ will automatically be selected as the entity. Select ‘Est. Revenue’ as the field, enter the Recommendation Title. I used Suggest ‘5% discount’. The recommendation Details field is the message the user will see when they click on the the recommendation icon, so make sure you word this right. I entered:’Since the est. revenue for this oppty is less than $1,000, we recommend a 5% discount’. Click the blue apply button on the bottom right. Now lets add the action that will happen when the user applies this recommendation:

Click on the Components tab again, then click on ‘Details’ under the recommendation action to expand the action list. Drag the ‘Set Field Value’ component under the action section of the recommendation.
Use a short description for the display name:’Update Discount (%) to 5′. Under Field Value, choose ‘Opportunity Discount (%)’ as the field, select ‘Value’ as the type and choose ‘5’ as the value. Click the blue apply button on the bottom right.

Est. Revenue Between 1001-5000: Recommendation: 10% discount
Click on components on the right, and drag another Condition under the first Condition. In the second condition we want to make sure the dollar amount in the ‘Est. Revenue’ field is between $1,001-$5,000:
In the first rule, select ‘entity’ as the source, select ‘Est. Revenue’ as the field, select ‘Is greater than’ as the operator, select ‘Value’ as the type and ‘1,001’ as the value. Click on the blue ‘+New’ icon in the rule window to add a second condition. For the second rule, select ‘entity’ as the source, then select ‘Is less than or equal to’ as the operator, select ‘Value’ as the type and ‘5,0000’ as the value. The rule logic should be ‘And’ because we want both conditions to be true. Click the blue apply button on the bottom right.
Click on components and drag the ‘Recommendations’ action next to the condition you just configured. In the recommendation name, you can enter a short description. I entered =<1001-5000 – 10% discount. ‘Opportunity’ will automatically be selected as the entity. Select ‘Est. Revenue’ as the field, enter the Recommendation Title. I used Suggest ‘10% discount’. The recommendation Details field is the message the user will see when they click on the the recommendation icon, so make sure you word this right. I entered: ‘Since the est. revenue for this oppty is between 1-5K, we recommend a 10% discount’. Click the blue apply button on the bottom right. Now lets add the action that will happen when the user applies this recommendation:

Click on the Components tab again, then click on ‘Details’ under the recommendation action to expand the action list. Drag the ‘Set Field Value’ component under the action section of the recommendation.
Use a short description for the display name:’Update Discount (%) to 10′. Under Field Value, choose ‘Opportunity Discount (%)’ as the field, select ‘Value’ as the type and choose ’10’ as the value. Click the blue apply button on the bottom right.

Est. Revenue 25000 or more: Recommendation: 20% discount

Click on components on the right, and drag another Condition under the previously created condition. In this last condition we want to make sure the dollar amount in the ‘Est. Revenue’ field is $25,000 or more.
In the rule section, select ‘entity’ as the source, select ‘Est. Revenue’ as the field, select ‘Is greater or equal to’ as the operator, select ‘Value’ as the type and ‘25,000’ as the value. Click the blue apply button on the bottom right.
Click on components and drag the ‘Recommendations’ action next to the condition you just configured. In the recommendation name, you can enter a short description. I entered =Est. Revenue 25K+: 20% Discount. ‘Opportunity’ will automatically be selected as the entity. Select ‘Est. Revenue’ as the field, enter the Recommendation Title. I used Suggest ‘20% discount’. The recommendation Details field is the message the user will see when they click on the the recommendation icon, so make sure you word this right. I entered: ‘Since the est. revenue for this oppty is 25K or more, we recommend a 20% discount’. Click the blue apply button on the bottom right. Now lets add the action that will happen when the user applies this recommendation:

Click on the Components tab again, then click on ‘Details’ under the recommendation action to expand the action list. Drag the ‘Set Field Value’ component under the action section of the recommendation.
Use a short description for the display name:’Update Discount (%) to 20. Under Field Value, choose ‘Opportunity Discount (%)’ as the field, select ‘Value’ as the type and choose ’20’ as the value. Click the blue apply button on the bottom.

Click save on the top right, then activate the business rule.

I hope you enjoyed this post! Be sure to check in again next week for a new topic or subscribe here to never miss another post!

Share this!

2 Comments to Recommendations in Dynamics 365

  1. Thanks Dian! I see a number of use cases for this new feature! I shared your post with our internal project team which includes some of your RSM colleagues!

    • Hi Josh,
      I’m glad you enjoyed this post! Great to hear you’ll get some use out of it!