Views:

Overview

In this scenario we need to add some simple rules on our portal form:

  • If the customer wants to submit a Case that is of type Request then they must have a value in the Business Phone field on their profile
  • If they don't have a phone number, then we will alert them to this and prevent them from submitting the Case form
  • To prevent them from submitting the case, we will Disable the submit button.

North52 Decision Suite

The North52 Decision Suite solution works like this:

  • A Formula is set up on the Case entity web form which:
    • On change of the Case Type field on the portal form checks whether the currently logged in user has a value in the Business Phone field
    • If there is no value, a notification banner is displayed to the user and the form submit button is disabled 

Set up Formula

  • Create a new Formula, setting the following values in the Formula Guide:
    • Source Entity set to Case
    • Set Formula Type to ClientSide - Calculation
    • Select the Decision Table editor
    • Click the Create button
  • Set the Name to Case - Portal - Request Eligibility (or the name of your Case portal form)
  • Expand Source & Target
    • Set the Source Property to be Case Type on the Web - Edit Case form 
  • Expand Deployment Settings
    • Set Portal Deployment to specify the portal you are using e.g Customer Self-Service, Community Portal etc.
  • Click Save 

Set up Decision Table

We check if the Case Type is Request, and if the Business Phone field on the Contact does not contain data. If the Conditions are met then we perform 2 actions.
  • A SetFormNotification() function to alert the user that they must add a phone number to their profile
  • A DisableFields() function which can be used to disable an element on the portal via it's id.

Eligibility Decision Table - North52 Business Rules Engine for Dynamics 365

Testing

Once the formula is finished we can test it on our Portal.

Set the Case Type as Request and the warning message will be shown at the top of the page:

Portal Warning Message - North52 Business Rules Engine for Dynamics 365

The Submit Button has also been disabled:

Portal Disabled Submit Button - North52 Business Rules Engine for Dynamics 365