Salesforce lead creation and campaign attribution

Feature deprecation: Genesys will no longer support ACD Web Chat v2, which is available to customers via all its corresponding Chat Widget versions. This is further to the deprecation of ACD Web Chat v1, which was announced earlier. As a result, Predictive Engagement will also end support for these legacy web chat versions. For more information, see Deprecation: Removal of ACD Web Chat (version 2).

All existing customers are encouraged to migrate to Web Messaging and Messenger.

Prerequisites

  • Configure the following permissions in Genesys Cloud CX:
    • Architect > Flow > All
    • Architect > UI > All
    • Integrations > Integration > All
    • Integrations > Action > All
    • Journey > Action Map > All
    • Journey > Event Type > View (to configure an action map with an event trigger)
    • Journey > Report > View
    • Scripter > Published Script > Add, View (to add agent-facing scripts)
    • Scripter > Script > All (to create agent-facing scripts)
  • Deploy one of the following:

Configuration overview

Salesforce configuration overview

  1. Prepare your web campaign.
  2. Create a dedicated Salesforce user.
  3. Prepare the Salesforce data actions integration.
  4. Prepare the Salesforce data actions.
  5. Get the Salesforce Lead Creation and Campaign Attribution example workflow.
  6. In Genesys Cloud CX Architect, prepare a workflow.
  7. Prepare an action map to use the Architect flow action.
  8. Monitor your Architect flow action with a report.
  9. Genesys Cloud CX users: (Optional) Use scripts to help agents view and create a Salesforce lead:
    • Learn about the Salesforce Lead Creation and Campaign Attribution script
    • Download the Salesforce 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

Use the following UTM parameters to track campaign-related activity on your website:

  • Campaign ID
  • Last name
  • First name
  • Email

For more information about 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 acts on behalf of your entire organization to perform the data actions needed for the Salesforce integration.

Prepare the Salesforce integration and data actions

Prepare the Salesforce data actions integration

  1. In Genesys Cloud CX, go to Admin > Integrations > Integrations.
  2. Click + Integrations.
  3. Install a Salesforce data actions integration.
  4. 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

  1. Download the required Salesforce data actions. For download links and descriptions, see the table that follows these instructions.
  2. Import the data actions and associate them with the Salesforce data actions integration.
  3. (Optional) test the setup of your contract.
  4. Save and publish the data actions.
Note: You need all the data actions in the following table. These data actions work with the Architect workflow specifically. Do not modify them in any way.
Download link When you pass this information to the data action… The data action…
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 If the member is part of the campaign, returns a lead ID.
Salesforce-Create-Lead-By-Email.json Lead information Creates a lead in Salesforce with the attributes that 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, the workflow associates it with the campaign.
  • If the lead does not exist, the workflow creates the lead and associates it with the campaign.

You can provide the campaign ID to the workflow directly. If you do not provide the campaign ID, the workflow attempts to extract the UTM campaign from the session ID to complete the association.

  1. Download the Salesforce-Lead-Creation-And-Campaign-Attribution.i3WorkFlow
  2. Associate the data actions.
  3. Publish the workflow.
  4. Switch to Architect to prepare the workflow.

Prepare an action map to use an Architect flow action

Create the action map

Follow these instructions to create an action map that uses the Architect flow action.
Note: You can use the Journey JavaScript SDK to track custom events and trigger action maps when they occur. Start by tracking custom events with the ac(record’) method. Then, select user activity as the trigger for the action map and select the custom event that you want.

Override the default variable values

To create the new Salesforce lead with a richer set of journey data, override the default settings of these variables and tell Genesys Predictive Engagement where to obtain the user-specific values.

  1. Next to the variable to override, under Action click Edit.
  2. Select the Override the initial value for this action map check box.
  3. From the New value list, select the value to send to the data action.
    • Static value: Unique identifier that Genesys Predictive Engagement creates for every user.
    • Session: Unique identifier that helps track user activity over time. For more information about using the session ID with Architect, see Get Journey Session action.
    • External Contact ID: Unique identifier that maps a user across the Genesys suite of products.
    • Other values:
      • Event attribute: If you trigger the action map based on a form_submitted event, the form fields appear here.
  4. If a second list appears, select the source of the value.
  5. Click Override.
  6. Repeat these steps for all the variables to override.

Scripting: Use a script to help agents view, create, and update a Salesforce lead

Note: Scripting is available for Genesys Cloud CX customers only.
Salesforce agent script
A script is a set of instructions that helps agents as they interact with users. Genesys Predictive Engagement provides a script template that shares existing lead-related information about a user from Salesforce. If no Salesforce record exists for the user, the script helps the agent create a lead record in Salesforce, if appropriate. Salesforce lead information for a user displays and collects in a widget. To make this work, download both the script template and data actions.

For more information about scripts, see:

Download the Salesforce Lead Generation script template and data actions

  1. Click here to download the Genesys Predictive Engagement-Salesforce-View-Create-Update-Lead-Script.script
  2. 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…
Salesforce-Create-Lead-By-Email.json Lead information Creates a lead in Salesforce with the attributes that 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

To allow an agent to use the Salesforce script, configure the agent’s account with the following permissions:

  • Integrations> Action > Execute permission
  • Scripter > Published Script > View (to view agent-facing scripts)

Agents 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 appear in the Interaction panel for voice interactions.

To access a script, an agent clicks the following icon:

full

When the script opens, the agent can see whether the user is an existing lead. The agent can then complete the form to create or update the lead as necessary.