Salesforce - Lead Association Events

Contact Association events are required when you know the Opportunity object will be used to fire Conversion Events into Strala.

This event will have four parts:

  1. The Lead to Strala UUID association
  2. The Lead to converted Account association
  3. The Lead to converted Contact association
  4. The Lead to converted Opportunity association

The Lead Association Events

This will fire an Association Event into JourneyStream that allows us to tie Leads to Strala UUIDs. Without this, we cannot associate a Lead to it's online history.

Start a new process

To create this process, go to Process Automation > Process Builder > New

Name the Process

Name the process Strala Lead Association Events and have the process start when a record changes

Add the object

Choose the Lead object as the object that the criteria will be evaluated against. To do this, select Add Object to find and select the Lead object. Select when a record is created or edited . Under Advanced, check the box that allows for Recursion.

Add Lead has Strala UUID Criteria

Add criteria by selecting Add Criteria and then name the criteria Lead has Strala UUID. Select Conditions are met for the criteria for executing actions. Set two conditions and make sure All the conditions are met for the event to fire:
Field Operator Type Value
[Lead].strala_sys__UUID__c Is null Boolean False
[Lead].strala_sys__UUID__c Is changed Boolean True

Set immediate actions for Lead has Strala UUID

Create an Immediate Action by selecting  Add Action and name the action Send Association to JourneyStream. Choose the Post Association to JourneyStream as the Apex Class and set the following variables and select Save:
Field Type Value
Child ID Field Reference [Lead].strala_sys__UUID__c
Parent ID Field Reference [Lead].Id
Child Type String strala_who_uuid
Parent Type String lead_id

Add Lead Converted to Account Criteria

Add criteria by selecting Add Criteria and then name the criteria Lead Converted to Account. Select Conditions are met for the criteria for executing actions. Set two conditions and make sure all the conditions are met for the event to fire:
Field Operator Type Value
[Lead].ConvertedAccountId Is null Boolean False
[Lead].ConvertedAccountId Is changed Boolean True

Set Immediate actions for Lead Converted to Account

Create an Immediate Action by selecting Add Action and name the action Send Association to JourneyStream. Choose the Post Association to JourneyStream as the Apex Class and set the following variables and select Save:
Field Type Value
Child ID Field Reference [Lead].ConvertedAccountId
Parent ID Field Reference [Lead].id
Child Type String account_id
Parent Type String lead_id

Specify what happens to the previous criteria after evaluating the criteria by changing it from Stop the process to Evaluate the next criteria and select Save. This will allow this step to fire even if the previous event fires.

Add Lead Converted to Contact criteria

Add criteria by selecting Add Criteria and then name the criteria Lead Converted to Contact. Select Conditions are met for the criteria for executing actions. Set two conditions and make sure all the conditions are met for the event to fire:

Field Operator Type Value
[Lead].ConvertedContactId Is null Boolean False
[Lead].ConvertedContactId Is changed Boolean True

Set immediate actions for Lead Converted to Contact

Create an Immediate Action by selecting Add Action and name the action Send Association to JourneyStream. Choose the Post Association to JourneyStream as the Apex Class and set the following variables and select Save:
Field Type Value
Child ID Field Reference [Lead].ConvertedContactId
Parent ID Field Reference [Lead].id
Child Type String contact_id
Parent Type String lead_id

Specify what happens to the previous criteria after evaluating the criteria by changing it from Stop the process to Evaluate the next criteria and select Save. This will allow this step to fire even if the previous event fires.

Add Lead Converted to Opportunity criteria

Add criteria by selecting Add Criteria and then name the criteria Lead Converted to Opportunity. Select Conditions are met for the criteria for executing actions. Set two conditions and make sure all the conditions are met for the event to fire:

Field Operator Type Value
[Lead].ConvertedOpportunityId Is null Boolean False
[Lead].ConvertedOpportunityId Is changed Boolean True

Set immediate actions for Lead Converted to Opportunity

Create an Immediate Action by selecting Add Action and name the action Send Association to JourneyStream. Choose the Post Association to JourneyStream as the Apex Class and set the following variables and select Save:
Field Type Value
Child ID Field Reference [Lead].ConvertedOpportunityId
Parent ID Field Reference [Lead].id
Child Type String account_id
Parent Type String lead_id

Specify what happens to the previous criteria after evaluating the criteria by changing it from Stop the process to Evaluate the next criteria and select Save. This will allow this step to fire even if the previous event fires.

Activate the process

Activate the process by selecting the Activate button

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.