Salesforce lead creation and campaign attribution

From Genesys Documentation
Revision as of 11:44, July 15, 2020 by WikiSysop (talk | contribs) (Text replacement - "\|Platforms?=([^\|]*)PureEngage([\|]*)" to "|Platform=$1GenesysEngage-onpremises$2")
Jump to: navigation, search

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
    • 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 the Genesys Predictive Engagement tracking snippet on the website you want to track. This enables you to trigger the action map based on pageview events.
  • To trigger an action map based on other events, use ac('record') to send Genesys Predictive Engagement data about events you want to track.

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 and Campaign Attribution example workflow.
  6. In PureCloud 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. 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
  • Email

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

  1. In PureCloud, 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. Optionally test the setup of your contract.
  4. Save and publish the data actions.
Important
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.

  1. Click here to 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

Build the action map

Follow these instructions to build an action map that uses the Architect flow action.
Tip
You can use the Journey JavaScript SDK to track custom events and trigger action maps when they occur. To do this, start by tracking custom events with the ac(record') method. Then, select user activity as the trigger for the action map and select the specific custom event you want.

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.

  1. Next to the variable you want 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 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.
  4. If a second list appears, select the source of the value.
  5. Click Override.
  6. 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

Important
Scripting is available for PureCloud users only.
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 is displayed and collected in a widget. To make this work, download both the script template and data actions.

For general 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 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:

full

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

Agent script with Salesforce ID

Comments or questions about this documentation? Contact us for support!