Views:

Scenario Overview

In this scenario our business requirement is that when an Account is deactivated all associated Contact records are also deactivated. Additionally, if the Account is subsequently reactivated then reactivate the Contact records.

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • We create a Process Genie formula that is triggered when the Account status changes
  • The formula retrieves all the Contacts associated via the parentcustomerid field on the Contact entity
  • It then loops over all the contacts and changes the Status from Active to Inactive or from Inactive to Active


N52 Formula Manager Steps

The following set of steps will set this formula up:

  • Create a new formula of type 'Process Genie'
  • Set the Source Entity to 'Account'
  • Copy & paste the formula below into the formula description field and click save
  • Create a new workflow process for the Account entity which is started when the 'Record status changes' 
  • Add a N52 Process Genie step and add the Formula Short Code to the properties
  • Publish the workflow and test

 Formula

 

 

ForEachRecord(

   FindRecords('contact', 'parentcustomerid', [account.accountid], 'contactid'), 

   UpdateRecord('contact',
                         CurrentRecord('contactid'),
 
                         Case([account.statecode],
                                       When(0), Then (SetAttribute('statecode', '0|1')), /*Active*/
                                       When(1), Then (SetAttribute('statecode', '1|2')), /*In-active*/ 
                                       Default('NoOp')
                              )
                       )
               )

 

Wizard - FindValue



Please see below the wizard you can use to create the FindValue() function call used in this formula. 

Note that to find the Equals Value field here, you will need to go to Explore > Entities > Account > Account

Did you know?

Decision Tables Enable Responsive Businesses

You can make, test, and deploy changes to decision logic without software development. Rather that waiting weeks or months for internal or external developers to make needed updates and changes, they can be made by business analysts as they are needed.

Decision Tables within the North52 Decision Suite provide a business-friendly representation of the decision logic so that business analysts can define how the decisions are made. As you define your decision, you can test and validate the decision approach and when ready, deploy the decision logic to your production instance.

Learn more about the North52 Decision Tables