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 Recommendations which allows system to make a recommendation to user based on data entered in a form. When the conditions are met, a small light icon will be shown. If user clicks on that icon respective recommendation will be shown where user can click on Apply or ignore it. Here we will look at with a business scenario based on vaccinations value respective recommendation will be shown to user.
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.
After Step 1, select custom solution here select ContactCustomizations custom solution as shown in the below figure.
After Step 2, in ContactCustomizations custom solution open Contact Entity and then click on Business Rules tab and then Click on Add business rule as shown in the below figure.
After Step 3, a new Business rule window gets opened provide Business Rule name as Show Recommendation For a contact and meaningful description and provide condition if Vaccination Details Selected Yes as shown in the below figure.
After Step 4, go to Component’s tab in the right side of the window and select Recommendation Action and drop it to the right side of condition mentioned in Step 4 and click on Recommendation and provide Recommendation Name and select Field where recommendation icon to be shown and provide Recommendation title and Recommendation Details and observe code window as shown in the below figure.
After Step 5, Expand Details part of 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.
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.
After Step 7, now drag and drop Recommendation and provide relevant name as Not Vaccinated and select Field Vaccination and Title as Not Vaccinated and Recommendation Details with Provide Discount 20 % and click on Apply as shown in the below figure.
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.
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.
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.
After Step 11, save and activate 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 and Recommendation title and description will be shown and Apply button if click on it then Discount will be shown as 50 as shown in the below figure.
After Step 12, if Vaccination is selected as No and Recommendation title and description will be shown and click on Apply button it then Discount will be shown as 20 as shown in the below figure.
After Step 13, if Vaccination is selected as None and 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.
- Please make sure you keep the required fields on Contact Form.
- Select fields for Actions as well as for Conditions without fail.
- Make sure to Activate Business Rule after save.
- Publish all changes without fail.
- Give name of conditions and Actions names in a meaningful way.
Conclusion: In this way one can easily help user to provide recommendations easily so that proper action can be taken.
2 thoughts on “Back to Basics # 16: Business Rules with Actions Recommendations”
Pingback: Rewind August 2021 – Common Man Tips for Power Platform, Dynamics CRM,Azure
Pingback: Back To Basics # : Curated List of Articles in a Single Page – Common Man Tips for Power Platform, Dynamics CRM,Azure