In this scenario, we want to send a follow up email using a workflow setting the To field using an address we get from the email's related Account.
Out of the box this is not possible, however, we can do this using North52's native functions.
Note: We could in theory remove the workflow and do everything in the formula. However in the real world, its more likely that this requirement will be part of a process that uses workflows.
North52 BPA Solution
The North52 BPA solution works like this:
- A Formula is set up on the Email entity
- It will update the To field with the value from the related Account email address 3 field
- A Workflow is created that has two steps:
- Create the email
- Use North52s Process Genie to call the formula
Set up Workflow and Formula
- Create a new formula, setting the following values in the Formula Guide:
- Source Entity set to Email
- Set Formula Type to Process Genie
- Select the Classic editor
- Change the Name of the formula to Set To field to the Accounts Email Address 3
- Copy and paste the following formula into the main editors canvas:
AddEntityToEC(GetVar('ActivityPartyEC'), CreateEntity('activityparty', SetAttribute('addressused', [email.regardingobjectid.emailaddress3.?]))),
SetVar('EmailNative',CreateEntity('email', SetAttribute('activityid', [email.activityid])) ),
- Click Save
- Take note of the Formula Short Code in the top right hand corner of the form
- Navigate to Settings > Processes
- Click the New icon
- Enter Create Email and set the To field as the process name
- Select Workflow for the Category
- Select Account for the Entity
- Select OK
- Check As an on-demand process
- Uncheck Record is created
- Select Add Step > Create Record
- Select Add Step > North52 > N52 Process Genie
- Select View Properties
To test this scenario, open an Account. Make sure it has an email address in the email address 3 field and run the workflow. You can see the workflow running Settings > System Jobs
Did you know?
North52 has over 500 functions to help you implement advanced business rules and complex decision logic
The Formula Manager, part of the North52 Decision Suite is a business rules engine that aims to eliminate this custom coding by using simple formulas instead. It is significantly faster (up to 10 times) than writing custom code and you get the added bonus of lower cost updates if a business rule changes in the future (it is much faster and thus cheaper to change it using a Formula rather than custom code).
There are over 500 functions available in the North52 Decision Suite business rules engine!