Get Response Information on Lead and Contact
If you are wanting to view and report on key response information on the lead or contact object, see the following on the steps to achieve this:
1. Install RMEX Unlocked Package
- Contact your Customer Success Rep, or log a case to get a link to the RMEX Unlocked Package
- Install the Package for Admin Users in your org. (Recommended to install in a sandbox first.)
2. Register the Platform Event plugin
- Navigate to Funnel Metrics configuration -> Advanced Configuration
- At the bottom of the page, make sure Enable API is checked.
- Type FC_AsyncEventPlugin and click on 'Add Plugin Class'.
- Save the page and make sure that the class is now listed in this section.
3. Create fields on Lead and Contact
Create the following four fields on both the lead and contact object:
- Active Response ID (18 char text)
- Active Response Date (Date/time)
- Most Recent Response ID (18 char text)
- Most Recent Response Date (Date/time)
4. Create the Flow
You will need to create a Salesforce Flow that will be triggered by the platform event (from the installed package) and will then populate the above fields on the lead and contact.
- Go to setup → QuickFind → Flows and click New Flow.
- Select a Platform Event - Triggered Flow and create the flow.
- When instructed to select a platform event, type and select FC_ExtensionEvent.
-
Create the first Decision for the Flow:
The first decision ensures the flow will only execute on the correct extensibility event, in this case it is:
ActiveResponseProcessed.In the "Resource" text box, start typing $Record to then select the "Event Name". In the "Value" checkbox, type"ActiveResponseProcessed".It should look like the below: -
Create the second Decision for the Flow:
The second decision determines which Object will get updated. In an active response processed event, RecordID1 contains the ID of the lead or contact that the flow should consider. We decide if we are looking at a lead or a contact by the prefix in that field (Lead starts with 00Q, Contact starts with 003). The criteria for the outcome for a Contact record looks like this:
-
Fetch the Records:
You will need to create two "Get Records" events. One for fetching the most recent response, and one for fetching the Active Response. The platform event passes the IDs of the active and most recent Campaign Member so flows that need more details (i.e. Response Date, Campaign ID) can pull the record with the necessary fields. The Get Records configuration for most recent campaign member should look like the photo below. Since we are fetching by ID we can be sure only one record will be pulled at a time. Fetching the active response should be identical to this process, except using $Record > FC_RecordID3.
- Update the Record:
Based on the decision, update either the contact or the lead stored in FC_RecordID1, and configuring the edit record component looks very similar to the get record component.
You will use the ID and Response Date fields on the campaign member records that were fetched to populate the new fields created on the Lead and Contact.
8. The Final Flow should look like the below:
Comments
0 comments
Please sign in to leave a comment.