Business Rules With Actions Recommendations

Introduction

In Dynamics 365 CRM or Power Platform, business rules provide a quick way of applying business conditions. Every business rule starts with a condition. In this article, we are going to see about an action recommendation that allows the system to make a recommendation to users based on data entered in a form. When the conditions are met, a small light icon will be shown. If the user clicks on that icon the respective recommendation will be shown where the user can click on Apply or ignore it. Here we will look at a business scenario based on vaccinations value respective recommendations will be shown to the user.

Step 1

Login to the required Dynamics CRM/ Power Apps environment using URL make.powerapps.com by providing user name and password and go to solutions as shown in the below figure.

Business Rules with Actions Recommendations

Step 2

After step 1, the select custom solution here selects ContactCustomizations custom solution as shown in the below figure.

Business Rules with Actions Recommendations

Step 3

After step 2, in the ContactCustomizations custom solution open Contact Entity and then click on the Business Rules tab, and then click on Add business rule as shown in the below figure.

Business Rules with Actions Recommendations

Step 4

After step 3, a new Business rule window gets opened. Provide Business Rule name as Show Recommendation For contact and meaningful description and provide condition if Vaccination Details Selected Yes as shown in the below figure.

Business Rules with Actions Recommendations

Step 5

After step 4, go to Component’s tab on the right side of the window and select RecommendationAction and drop it to the right side of the condition mentioned in Step 4. Click on Recommendation and provide Recommendation Name and select Field where recommendation icon is to be shown and provide Recommendation title and Recommendation Details and observe code window as shown in the below figure.

Business Rules with Actions Recommendations

Step 6

After step 5, expand the details part of the above Recommendation Vaccinated and provide action as Discount Action if Vaccinated and in the Field, Value select Field as Discount and give Value as 50 as shown in the below figure.

Business Rules with Actions Recommendations

Step 7

After step 6, in the else part of Condition Vaccination Details Selected Yes drag and drop another Condition and provide name as Vaccination Details Selected No and provide rule as Vaccination value as No and click on Apply as shown in the below figure.

Business Rules with Actions Recommendations

Step 8

After step 7, now drag and drop Recommendation and provide relevant name as Not Vaccinated and select FieldVaccination and Title as Not Vaccinated and Recommendation Details with Provide Discount 20 % and click on Apply as shown in the below figure.

Business Rules with Actions Recommendations

Step 9

After step 8, select Actions under Not Vaccinated Recommendation and provide action name as Discount id Not Vaccinated and under Field Value section select field Discount and provide value as 20 and click on Apply as shown in the below figure.

Business Rules with Actions Recommendations

Step 10

After step 9, under else part of Condition Vaccination Details Selected No and Select another Recommendation and provide name as No Discount and Field as Vaccination and Recommendation Title as Vaccination Details Not Disclosed and Recommendation Details as No Discount and click on Apply as shown in the below figure.

Business Rules with Actions Recommendations

Step 11

After step 10, under No Discount Recommendation select Action and provide name as Discount if Vaccination Information Not Shared, and under Field Value Section select Field as Discount and Value as 0 and click on Apply as shown in the below figure.

Business Rules with Actions Recommendations

Step 12

After step 11, save and activate the business rule and publish Contact Customization’s solution as specified in Step 3 and then open any contact record and see if Vaccination is selected as Yes. Recommendation title and description will be shown and if you click on Apply buttonthen Discount will be shown as 50 as shown in the below figure.

Business Rules with Actions Recommendations

Step 13

After step 12, if Vaccination is selected as No, Recommendation title and description will be shown. Click on Apply button and then Discount will be shown as 20 as shown in the below figure.

Business Rules with Actions Recommendations

Step 14

After step 13, if Vaccination is selected as None then Recommendation title and description will be shown and click on Apply button then Discount will be shown as 0 as shown in the below figure.

Business Rules with Actions Recommendations

Note

  1. Please make sure you keep the required fields on Contact Form.
  2. Select fields for Actions as well as for Conditions without fail.
  3. Make sure to Activate Business Rule after save.
  4. Publish all changes without fail.
  5. Give the name of conditions and Actions names in a meaningful way.

Conclusion

In this way, one can easily help users to provide recommendations easily so that proper action can be taken.