Salesforce lead creation and campaign attribution
Contents
- 1 Process overview
- 2 Prepare your web campaign with UTM parameters
- 3 Create a dedicated Salesforce user
- 4 Prepare the Salesforce integration and data actions
- 5 Prepare the Salesforce Lead Creation and Campaign Attribution example workflow
- 6 Prepare an action map to use an Architect flow action
- 7 Scripting: Use a script to help agents view, create, and update a Salesforce lead
- 8 Download the Salesforce Lead Generation script template and data actions
- 9 Configure agent accounts
- 10 How agents access and use the Salesforce Lead Generation script
Use Genesys Predictive Engagement to track campaign-related web activity and create leads with their associated campaign attributes in Salesforce. Also provide agents with a script they can use to create and update Salesforce leads.
Prerequisites
- Configure the following permissions in PureCloud:
- Architect > Flow > All permission
- Architect > UI > All permission
- Integrations > Integration > All permissions
- Integrations > Action > All permission
- Journey > Action Map > All permissions
- Journey > Event Type > View permission (to configure an action map with an event trigger)
- Journey > Report > View permission
- Scripter > Published Script > Add, View (to add agent-facing scripts)
- Scripter > Script > All (to create agent-facing scripts)
Process overview
- Prepare your web campaign.
- Create a dedicated Salesforce user.
- Prepare the Salesforce data actions integration.
- Prepare the Salesforce data actions.
- Get the Salesforce Lead Creation and and Campaign Attribution example workflow.
- In PureCloud Architect, prepare a workflow.
- Prepare an action map to use the Architect flow action.
- Monitor your Architect flow action with a report.
- PureCloud users: Optionally use scripts to help agents view and create a Salesforce lead:
- Learn about the Salesforce Lead Creation and Campaign Attribution script.
- Download theSalesforce Lead Creation and Campaign Attribution script.
- Configure agent accounts.
- Communicate with agents about how to access and use the Salesforce Lead Creation and Campaign Attribution script.
Prepare your web campaign with UTM parameters
Please use the following UTM parameters to track campaign-related activity on your website:
- Campaign ID
- Last name
- First name
For more information on configuring UTM parameters, see Campaign attributes.
Create a dedicated Salesforce user
In Salesforce, create a dedicated user account with the appropriate rights to use the Salesforce data action integration on behalf of Genesys Predictive Engagement. This user account will act on behalf of your entire organization to perform the data actions that are needed for the Salesforce integration.
Prepare the Salesforce integration and data actions
Prepare the Salesforce data actions integration
- In PureCloud, go to Admin > Integrations > Integrations.
- Click + Integrations.
- Install a Salesforce data actions integration.
- On the Configuration tab, configure the credentials to use the dedicated Salesforce user account that you created in your Salesforce organization.
Prepare the Salesforce data actions
- Download the required Salesforce data actions. For download links and descriptions, see the table that follows these instructions.
- Import the data actions and associate them with the Salesforce data actions integration.
- Optionally test the setup of your contract.
- Save and publish the data actions.
{{NoteFormat|
- You need all of the following data actions.
- These data actions are specifically designed to work with the Architect workflow. Do not modify them in any way.
Salesforce data actions download links
Download link | When you pass this information to the data action... | The data action does this... |
---|---|---|
Salesforce-Associate-With-Campaign.json | Campaign Id and a lead Id | Calls the salesforce API to include the lead in the campaign |
Salesforce-Check-if-Lead-is-Associated-With-Campaign.json | Campaign Id and an email | Returns a lead Id if the member is part of the campaign |
Salesforce-Create-Lead-By-Email.json | Lead information | Creates a lead in Salesforce with the attributes you specify |
Salesforce-Get-Campaign-Id-From-Campaign-Name.json | Campaign name | Returns the campaign Id that matches the name |
Salesforce-Get-Lead-By-Email.json | Email address | Retrieves the lead attributes associated with the email address |
Prepare the Salesforce Lead Creation and Campaign Attribution example workflow
The Salesforce Lead Generation example workflow associates a lead with a specified campaign in Salesforce.
- If the lead exists, then the workflow associates it with the campaign.
- If the lead does not exist, then the workflow creates the lead and associates it with the campaign.
You can provide the campaign ID directly to the workflow. If you do not provide the campaign ID, the workflow attempts to extract the UTM campaign from the session Id to complete the association.
- Click here to download the Salesforce-Lead-Creation-And-Campaign-Attribution.i3WorkFlow
- Associate the data actions.
- Publish the workflow.
- Switch to Architect to prepare the workflow.
Prepare an action map to use an Architect flow action
Build the action map
Follow these instructions to build an action map that uses the Architect flow action.Override the default variable values
To create the new Salesforce lead with a richer set of journey data, you must override the default settings of these variables and tell Genesys Predictive Engagement where to obtain the user-specific values.
- Next to the variable you want to override, under Action click Edit.
- Select the Override the initial value for this action map check box.
- From the New value list, select the value you want to send to the data action.
- Static value: This is a unique identifier that Genesys Predictive Engagement creates for every user.
- Session: This is a unique identifier that helps track user activity over time. For more information on how the session ID is used with Architect, see Get Journey Session action.
- External Contact ID: This is a unique identifier that maps a user across the Genesys suite of products.
- Other values:
- Event attribute: If you use trigger the action map based on a form_submitted event, the form fields appear here.
- If a second list appears, select the source of the value.
- Click Override.
- Repeat these steps for all of the variables you want to override.
Scripting: Use a script to help agents view, create, and update a Salesforce lead
For general information about scripts, see:
Download the Salesforce Lead Generation script template and data actions
- Click here to download the Genesys Predictive Engagement-Salesforce-View-Create-Update-Lead-Script.script
- Download the required data actions. For more information, see the following table.
Download link | When you pass this information to the data action... | The data action does this... |
---|---|---|
Salesforce-Create-Lead-By-Email.json | Lead information | Creates a lead in Salesforce with the attributes you specify |
Salesforce-Get-Lead-By-Email.json | Email address | Retrieves the lead attributes associated with the email address |
Salesforce-Update-Lead-By-Id.json | Lead information | Updates an existing lead in Salesforce with the specified attributes |
Configure agent accounts
In order for an agent to use the Salesforce script, you must configure the agent's account with the following permissions:
- Integrations> Action > Execute permission
- Scripter > Published Script > View (to view agent-facing scripts)
Agents will use the same dedicated Salesforce user account that Genesys Predictive Engagement uses to view and update leads in Salesforce.
How agents access and use the Salesforce Lead Generation script
Scripts automatically appear in the Interaction panel for voice interactions.
To access a script, an agent clicks this icon:
