Scenario Overview

This simple scenario is an example of how to make a change a score from a Survey response based on how many other open cases the customer has in CRM currently.

The reason for this would be that if a customer has multiple open cases then we might lower the survey response score to highlight the fact that this customer may need some additional care or support.

Survey Response

N52 Formula Manager Solution

The Formula Manager solution works like this:

  • Formula of type 'Save - To Current Record' is set up on the Survey Response entity  
  • The formula is configured to the Pre-Operation stage.
  • The formula is triggered on Create of the Survey Response.

N52 Formula


N52 Formula Manager Steps

The following set of steps outline how to create this Formula:

  • Create the formula of type Save - To Current Record on the Survey Response entity 
  • Copy in the formula code below
  • Use N52 Commands button to Toggle Advanced View and set the Stage to Pre-Operation
  • Create the FetchXML CountOpenCases and copy in the code below.
  • Click save and test


    SetVar('OpenCases', FindCountFD('CountOpenCases', 
                      '0', true,
    Setvar('Score', [msdyn_surveyresponse.msdyn_score]),
    Iftrue(GetVar('OpenCases') > 0,  GetVar('Score')-20)


FetchXML CountOpenCases

<fetch version="1.0" >
  <entity name="incident" >
    <attribute name="incidentid" />
      <condition attribute="contactid" operator="eq" value="{0}" />                              
      <condition attribute="statecode" operator="eq" value="0" />
      <condition attribute="prioritycode" operator="eq" value="2" />

Did you know?

North52's TestShield provides 3 different test types

TestShield current support 3 test types: Process Shield, API Shield and Data Shield.

Process Shield - Testing of end-to-end processes – learn more

API Shield - Testing APIs to ensure they are working as expected – learn more

Data Shield - Ensure that your data hasn’t changed or falls outside of thresholds – learn more