Views:

Scenario Overview 

In this scenario, we want our all Users with the Sales Manager role to be brought in automatically to important Opportunities

We will create a formula that adds our Sales Manager into the Team for any Opportunity that has an Est Revenue greater than 1 million euro. 

This formula will also remove our Sales Manager from this Team if the Est. Revenue goes below 1 million euro. 

Note 1: For this example you will need to have a team called Sales Manager setup beforehand. It will need to have the role Sales Manager given to it. 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A formula of type 'Save - Perform Action' is created on the Opportunity entity
  • This Formula will be triggered whenever an Opportunity is created or the Est. Revenue field is updated
  • The formula will add all Users with the Security Role 'Sales Manager' to the Team Access for the Opportunity record if the Est Revenue is greater than 1 million euros
  • It will also remove these Sales Managers if the Est Revenue goes below 1 million euros

North52 Decision Suite Steps

  • Create a new formula of type 'Save - Perform Action'
  • Set the Mode to 'Server Side'
  • Set Event to 'Create & Update'
  • Set Source Entity as 'Opportunity '
  • Set Source Property to 'Est. Revenue'
  • Click into the Formula Editor canvas
  • Copy and paste the formula below into the Formula Editor
  • Click Save
  • Click on the Fetch-Xml tab
  • Click the "+" symbol. 
  • For Name , enter "Find All users with Sales Manager Role"
  • For Query, please copy and past the Fetch XML below.
  • Click Save and Close.
  • You are now ready to test.


Formula

if(Containsdata([opportunity.owningteam.name.?]), 

  If ([opportunity.estimatedvalue] > 1000000, 

    AddUsersToTeam([opportunity.owningteam.name.?], 
     		    FindListValuesEx(FindRecordsFD('Find All users with Sales Manager Role'),
       		  'systemuserid')), 

    RemoveUsersFromTeam( [opportunity.owningteam.name.?], 
   		        FindListValuesEx(FindRecordsFD('Find All users with Sales Manager Role'),
        	       'systemuserid'))
  ) , 

  'NoOp'
)

FetchXML

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="systemuser">
    <attribute name="fullname" />
    <attribute name="businessunitid" />
    <attribute name="title" />
    <attribute name="address1_telephone1" />
    <attribute name="positionid" />
    <attribute name="systemuserid" />
    <order attribute="fullname" descending="false" />
    <link-entity name="systemuserroles" from="systemuserid" to="systemuserid" visible="false" intersect="true">
      <link-entity name="role" from="roleid" to="roleid" alias="ac">
        <filter type="and">
          <condition attribute="roleid" operator="eq" uiname="Sales Manager" uitype="role" value="{8BEDBFB8-0095-44B2-8990-616B86F06921}" />
        </filter>
      </link-entity>
    </link-entity>
  </entity>
</fetch>

Did you know?

You can Connect to 1000s of Web Services as part of your Decision Logic

When your advanced business rules and complex logic requries that you integrate with other systems North52's Web Fusion functionality can help.  It enables two-way data communication between your Dynamics 365/CRM system and another service or application.

Learn more and see examples of Web Fusion