Views:

Scenario Overview

In this example we have an requirement to make sure any Contact does not already have a Queue associated with any if its email addresses. 

Note : You will need to make all three email fields ( Email, Email Address 2, Email Address 3 ) visible on the form for this example. You will also need to give some Queue entities an Incoming Email value for testing. 

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • Whenever a Contact is created or its 3 email fields ( Email, Email Address 2, Email Address 3 ) are updated , the formula is triggered.
  • The formula will create a list of every Queue entities Incoming Email. 
  • The formula will then compare this list to the 3 email addresses on the Contact entity
  • If any of the emails match, the field in question is cleared.  

Note that this is all done PreOperation to avoid an infinite loop. 
                

N52 Formula Manager Steps

  • Create a new formula of type 'Save - Perform Action'
  • Set the Event field to 'Create & Update'
  • Set the Source Entity to 'Contact'
  • Set the Source Property to 'Email ' , 'Email Address 2' and 'Email Address 3'   . Note to mutli-select, please hold down Ctrl. 
  • Expand Deployment Settings
  • Set Pipeline Stage to' Pre-Operation (Synchronous)  '
  • Copy & paste the formula below into the formula description field & click save
  • You are ready to test

Note : To test ,create a Queue and give its Incoming Email a value. Then try to create a Contact with the same value for any of its email addresses. 

Formula

SmartFlow(


  SetVar('EmailList' ,  FindListValues('queue','*','*','emailaddress','50','true')) ,

  SetEntityTargetRecord(
    
      iftrue ( Contains(GetVar('EmailList'),[contact.emailaddress1]) ,
              SetAttribute('emailaddress1', Clear())    ), 

        iftrue ( Contains(GetVar('EmailList'),[contact.emailaddress2]) ,
              SetAttribute('emailaddress2', Clear())    ), 

        iftrue ( Contains(GetVar('EmailList'),[contact.emailaddress3]) ,
            SetAttribute('emailaddress3', Clear())    )

              )

    )