Salesforce

Overview

Salesforce is a Customer Relationship Management (CRM) platform that is designed to help you sell, service, analyze, and connect with your customers.

Integrating Lytics with Salesforce allows you to import leads and opportunities to merge your CRM data with rich behavioral data in Lytics to gain a more complete view of your customers. Engage your users with messages on any channel based on their status in your sales cycle. You can also export any Lytics user fields such as Behavioral Scores and content affinities to qualify and sort your leads in Salesforce.

Authorization

If you haven't already done so, you will need to set up a Salesforce account before you begin the process described below. Salesforce supports OAuth2, which allows you to simply enter your username and password to connect Lytics with Salesforce.

The user connecting to Salesforce must have the API Enabled and Offline User permissions within Salesforce. You can read more on Salesforce permissions.

If you are new to creating authorizations in Lytics, see the Authorizations documentation for more information.

  1. Select Salesforce from the list of providers.
  2. Select the OAuth2 method for authorization.
  3. Input your Salesforce username and password into the login screen.
  4. Enter a Label to identify your authorization.
  5. (Optional) Enter a Description for further context on your authorization.
  6. Click Save Authorization.

Import Audiences & Activity Data

Importing Leads and Opportunities from Salesforce allows you to enrich Lytics profiles with sales and CRM data to improve targeting for your marketing efforts.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration.
  • Frequency: One time Batch Integration, with the option to update hourly.
  • Resulting data: User Profiles containing Lead or Opportunity data from Salesforce.

This integration utilizes Salesforce APIs to import user data. Once the import is started the job will:

  1. Request Salesforce objects to import.
  2. Ingest the data from the JSON files into the respective stream until there are no additional pages to import.

Account, Contact, Lead, and Opportunity data will be mapped to the following streams respectively: salesforce_accounts, salesforce_contacts, salesforce_leads, and salesforce_opportunities streams.

Fields

The following fields are included in the default mapping of the salesforce_accounts stream:

Source FieldLytics User FieldDescriptionType
account_contact_idsalesforce_contact_ids unique idSalesforce: Contact Ids[]string
account_annual_revenuesalesforce_account_annual_revenueSalesforce: Account Annual Revenuenumber
account_billing_citysalesforce_account_billing_citySalesforce: Account Billing Citystring
account_billing_country_codesalesforce_account_billing_countrySalesforce: Account Billing Countrystring
account_billing_latitudesalesforce_account_billing_latitudeSalesforce: Account Billing Latitudestring
account_billing_longitudesalesforce_account_billing_longitudeSalesforce: Account Billing Longitudestring
account_billing_postal_codesalesforce_account_billing_postal_codeSalesforce: Account Billing Postal Codestring
account_billing_state_codesalesforce_account_billing_stateSalesforce: Account Billing Statestring
account_billing_streetsalesforce_account_billing_streetSalesforce: Account Billing Streetstring
account_created_datesalesforce_account_created_dateSalesforce: Account Created Datedate
account_industrysalesforce_account_industrySalesforce: Account Industrystring
account_is_partnersalesforce_account_is_partnerSalesforce: Account Is Partnerbool
account_namesalesforce_account_nameSalesforce: Account Namestring
account_number_of_employeessalesforce_account_number_of_employeesSalesforce: Account Number of Employeesint
account_ownershipsalesforce_account_ownershipSalesforce: Account Ownershipstring
account_ratingsalesforce_account_ratingSalesforce: Account Ratingstring
account_shipping_citysalesforce_account_shipping_citySalesforce: Account Shipping Citystring
account_shipping_country_codesalesforce_account_shipping_countrySalesforce: Account Shipping Countrystring
account_shipping_postal_codesalesforce_account_shipping_postal_codeSalesforce: Account Shipping Postal Codestring
account_shipping_state_codesalesforce_account_shipping_stateSalesforce: Account Shipping Statestring
account_shipping_streetsalesforce_account_shipping_streetSalesforce: Account Shipping Streetstring
account_sourcesalesforce_account_sourceSalesforce: Account Sourcestring
account_typesalesforce_account_typeSalesforce: Account Typestring
account_websitesalesforce_account_websiteSalesforce: Account Websitestring

The following fields are included in the default mapping of the salesforce_contacts stream:

Source FieldLytics User FieldDescriptionType
contact_idsalesforce_contact_ids unique idSalesforce: Contact Ids[]string
contact_emailemail unique idEmailstring
contact_emailemaildomainsEmail Domains[]string
contact_birthdatesalesforce_contact_birthdateSalesforce: Contact Birthdatedate
contact_citysalesforce_contact_citySalesforce: Contact Citystring
contact_country_codesalesforce_contact_countrySalesforce: Contact Countrystring
contact_created_datesalesforce_contact_created_dateSalesforce: Contact Created Datedate
contact_departmentsalesforce_contact_departmentSalesforce: Contact Departmentstring
contact_email_bounced_reasonsalesforce_contact_email_bounced_reasonSalesforce: Contact Email Bounced Reasonstring
contact_has_opted_out_of_emailsalesforce_contact_has_opted_out_of_emailSalesforce: Contact Has Opted Out Of Emailbool
contact_is_email_bouncedsalesforce_contact_is_email_bouncedSalesforce: Contact Is Email Bouncedbool
contact_last_cu_request_datesalesforce_contact_last_cu_request_dateSalesforce: Contact Last Stay-In-Touch Request Sentdate
contact_email_bounced_datesalesforce_contact_last_email_bounced_dateSalesforce: Contact Email Bounced Datedate
contact_last_modified_datesalesforce_contact_last_modified_dateSalesforce: Contact Last Modified Datedate
contact_latitudesalesforce_contact_latitudeSalesforce: Contact Latitudenumber
contact_longitudesalesforce_contact_longitudeSalesforce: Contact Longitudenumber
contact_salutationsalesforce_contact_salutationSalesforce: Contact Salutationstring
contact_titlesalesforce_contact_titleSalesforce: Contact Titlestring
salesforce_last_user_importedSalesforce: Last User Importeddate
contact_lead_sourcesalesforce_lead_sourceSalesforce: Lead Sourcestring

The following fields are included in the default mapping of the salesforce_leads stream:

Source FieldLytics User FieldDescriptionType
lead_idsalesforce_lead_ids unique idSalesforce: Lead Ids[]string
lead_emailemail unique idEmailstring
lead_emailemaildomainsEmail Domains[]string
salesforce_last_user_importedSalesforce: Last User Importeddate
lead_companysalesforce_lead_companySalesforce: Lead Companystring
lead_converted_datesalesforce_lead_converted_dateSalesforce: Lead Converted Datedate
lead_created_datesalesforce_lead_created_dateSalesforce: Lead Created Datedate
lead_email_bounced_datesalesforce_lead_email_bounced_dateSalesforce: Lead Email Bounced Datedate
lead_email_bounced_reasonsalesforce_lead_email_bounced_reasonSalesforce: Lead Email Bounced Reasondate
lead_first_namesalesforce_lead_first_nameSalesforce: Lead First Namestring
lead_industrysalesforce_lead_industrySalesforce: Lead Industrystring
lead_is_convertedsalesforce_lead_is_convertedSalesforce: Lead Is Convertedbool
lead_last_modified_datesalesforce_lead_last_modified_dateSalesforce: Lead Last Modified Datedate
lead_last_namesalesforce_lead_last_nameSalesforce: Lead Last Namestring
lead_mobile_phonesalesforce_lead_mobile_phoneSalesforce: Lead Mobile Phonestring
lead_namesalesforce_lead_nameSalesforce: Lead Namestring
lead_number_of_employeessalesforce_lead_number_of_employeesSalesforce: Lead Number Of Employeesint
lead_phonesalesforce_lead_phoneSalesforce: Lead Phonestring
lead_postal_codesalesforce_lead_postal_codeSalesforce: Lead Postal Codestring
lead_record_typesalesforce_lead_record_typeSalesforce: Lead Record Typestring
lead_salutationsalesforce_lead_salutationSalesforce: Lead Salutationstring
lead_source, lead_lead_sourcesalesforce_lead_sourceSalesforce: Lead Sourcestring
lead_statussalesforce_lead_statusSalesforce: Most Recent Lead Statusstring
lead_titlesalesforce_lead_titleSalesforce: Lead Titlestring
lead_websitesalesforce_lead_websiteSalesforce: Lead Websitestring

The following fields are included in the default mapping of the salesforce_opportunities stream:

Source FieldLytics User FieldDescriptionType
opportunity_contact_idsalesforce_contact_ids unique idSalesforce: Contact Ids[]string
opportunity_lead_sourcesalesforce_lead_sourceSalesforce: Lead Sourcestring
opportunity_amountsalesforce_opportunity_amountSalesforce: Opportunity Amountnumber
opportunity_close_datesalesforce_opportunity_close_dateSalesforce: Opportunity Close Datedate
opportunity_created_datesalesforce_opportunity_created_dateSalesforce: Opportunity Created Datedate
opportunity_fiscalsalesforce_opportunity_fiscalSalesforce: Opportunity Fiscalstring
opportunity_fiscal_quartersalesforce_opportunity_fiscal_quarterSalesforce: Opportunity Fiscal Quarterstring
opportunity_fiscal_yearsalesforce_opportunity_fiscal_yearSalesforce: Opportunity Fiscal Yearint
opportunity_forecast_categorysalesforce_opportunity_forecast_categorySalesforce: Opportunity Forecast Categorystring
opportunity_forecast_category_namesalesforce_opportunity_forecast_category_nameSalesforce: Opportunity Forecast Category Namestring
opportunity_has_open_activitysalesforce_opportunity_has_open_activitySalesforce: Opportunity Has Open Activitybool
opportunity_is_closedsalesforce_opportunity_is_closedSalesforce: Opportunity Is Closedbool
opportunity_is_wonsalesforce_opportunity_is_wonSalesforce: Opportunity Is Wonbool
opportunity_last_modified_datesalesforce_opportunity_last_modified_dateSalesforce: Opportunity Last Modified Datedate
opportunity_namesalesforce_opportunity_nameSalesforce: Opportunity Namestring
opportunity_next_stepsalesforce_opportunity_next_stepSalesforce: Opportunity Next Stepstring
opportunity_probabilitysalesforce_opportunity_probabilitySalesforce: Opportunity Probabilitynumber
opportunity_stage_namesalesforce_opportunity_stage_nameSalesforce: Opportunity Stage Namestring
opportunity_typesalesforce_opportunity_typeSalesforce: Opportunity Typestring

Lytics will import all custom fields you've created for the above types of users, but you will need custom mappings to take full advantage of them.

Configuration

Follow these steps to set up and configure an import of Salesforce Leads & Opportunities in the Lytics platform.

  1. Select Salesforce from the list of providers.
  2. Select the Import Audiences & Activity Data job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. From the Maximum Daily API Calls numeric field, select the maximum number of API calls the Lytics import can make on your behalf per day. See API Limitations for tips on finding and estimating this.
  7. From the Custom Lead Fields input, select custom Lead fields to import in addition to the standard fields.
  8. From the Custom Contact Fields input, select custom Contact fields to import in addition to the standard fields.
  9. From the Custom Account Fields input, select custom Account fields to import in addition to the standard fields.
  10. From the Custom Opportunity Fields input, select custom Opportunity fields fields to import in addition to the standard fields.
  11. From the Import Leads checkbox, choose if you would like to include leads in the import.
  12. From the Keep Updated checkbox, continuously run this import.
  13. From the Run Hourly checkbox, run a continuous import hourly instead of daily.
  14. (Optional) In the Time of Day text input, enter in a time for the daily continuous import to run.
  15. (Optional) From the Time Zone input, select the time zone for the time of day entered above.
  16. (Optional) From the Lead Timestamp Field input, select a field on the Leads object to identify when the object was last modified. Lytics will use this field to search for newly created and updated objects when running continuously. If not selected, the Last Modified field will be used.
  17. (Optional) From the Contact Timestamp Field input, select a field on the Leads object to identify when the object was last modified. Lytics will use this field to search for newly created and updated objects when running continuously. If not selected, the Last Modified field will be used.
  18. (Optional) From the Account Timestamp Field input, select a field on the Leads object to identify when the object was last modified. Lytics will use this field to search for newly created and updated objects when running continuously. If not selected, the Last Modified field will be used.
  19. (Optional) From the Opportunity Timestamp Field input, select a field on the Leads object to identify when the object was last modified. Lytics will use this field to search for newly created and updated objects when running continuously. If not selected, the Last Modified field will be used.
  20. (Optional) From the Leads Since text input, add a date and time of the oldest Lead to import.
  21. (Optional) From the Contacts Since text input, add a date and time of the oldest Contact to import.
  22. (Optional) From the Accounts Since text input, add a date and time of the oldest Account to import.
  23. (Optional) From the Opportunities Since text input, add a date and time of the oldest Opportunity to import.
  24. Click Start Import.

Import Custom Object

Importing custom objects from Salesforce allows you to enrich Lytics profiles with sales and CRM data from your Salesforce account. This will aid in targeting for your marketing efforts.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration.
  • Frequency: One time Batch Integration or daily continuous updates.
  • Resulting data: Raw Event Data which may be mapped as custom User Field.

This integration utilizes Salesforce APIs to import user data. Once the import is started the job will:

  1. Request a set of information from the configured Salesforce object.
  2. Ingest data from the Salesforce object to the data stream stream defined during configuration.

The job will run again in 24 hours if configured to run continuously.

Fields

Lytics will import any fields that are selected during the job configuration. Because the imported fields are custom you will need to map the custom fields.

Configuration

Follow these steps to set up and configure an import of Salesforce in the Lytics platform.

  1. Select Salesforce from the list of providers.
  2. Select the Import Custom Object job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Using the Stream text input, select an existing stream to write to, or enter a new stream name.
  7. From the Maximum Daily API Calls numeric field, select the maximum number of API calls the Lytics job can make on your behalf per day.
  8. From the Salesforce Object input, select the Salesforce object you want to import.
  9. From the Salesforce Fields input, select fields to import.
  10. Toggle the Keep Updated checkbox to continuously run this export.
  11. (Optional) From the Timestamp Field input, select a field on the Salesforce object to identify when the object was last modified. Lytics will use this field to search for newly created and updated objects when running continuously. If not selected, the Last Modified field will be used.
  12. (Optional) From the Objects Since text input, add a date and time of the oldest object to import.
  13. (Optional) In the Time of Day text input, enter in a time for the daily continuous import to run.
  14. (Optional) From the Time Zone input, select the time zone for the time of day entered above.
  15. Click Start Import.

You should see the custom Salesforce object data populated in the stream selected shortly after starting the job.

Export Audiences

Exporting users to Salesforce will allow you to create new Leads or Opportunities from promising groups of users you've encountered through other channels such as the web, email, or mobile. This export supports any kind of Salesforce object. Exporting Lytics user fields to existing Leads can help qualify and sort your Leads.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration - Audience Trigger Integration.
  • Frequency: Real-time Integration with a one-time Backfill of the audience after setup.
  • Resulting data: New or existing Salesforce objects populated with Lytics user field and audience membership.

This integration utilizes the Salesforce APIs to send user data. Once the export is started the job will begin backfilling users who already exist in the selected audiences. For each user to export, regardless if the user is being added as part of the backfill, or they're entering/exiting the audience in realtime, it will:

  1. If a match field was provided during configuration, the job will update an existing Salesforce object based on values of the match field. Otherwise it will create a new Salesforce object.
  2. Keep your Lytics audience in sync with Salesforce by updating users in Salesforce as users are updated in Lytics.

Fields

All fields that are provided in the mapping during configuration will be sent to Salesforce.

Configuration

Follow these steps to set up and configure an export of Salesforce in the Lytics platform.

  1. Select Salesforce from the list of providers.
  2. Select the Export Audiences job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. From the Audiences field, input the Lytics audience(s) you'd like to send to Salesforce. Then click Next Step.
  7. In the Maximum Daily API Calls numeric field, enter the maximum number of API calls the Lytics workflow can make on your behalf per day.
  8. From the Salesforce Object field, select the Salesforce object type you would like to export to.
  9. From the Match Field field, input the field in Salesforce to match records to avoid duplicates. The field you select must be mapped in the fields below (either in the Required Fields or the Extra Fields).
  10. From the Send Audiences To field, select a field on your Salesforce object which will contain a list of Lytics audiences for the user.
  11. From the Required Fields section, map all the required fields from Lytics to Salesforce by selecting the Lytics field on the left, and its Salesforce destination field on the right. All fields in the Salesforce dropdown must be mapped.
  12. From the Extra Fields section, map all the extra fields from Lytics to Salesforce by selecting the Lytics field on the left, and its Salesforce destination on the right.
  13. From the Fields to Trigger section, select up to 75 user fields to trigger on. For any user currently in the exported audience, if any of the selected field values change, then the user will be sent to Salesforce.
  14. Click Start Export.
    Export Configuration
    You should see Lytics user data populated in your Salesforce object shortly after starting the workflow.

Salesforce Administrator Setup

You'll need to involve a Salesforce administrator when setting up the export. The administrator will need to perform the following setup:

  1. Set up a Duplicate Rule in Salesforce for leads (configuration pictured below).
  2. Set up the following Custom Fields on the Salesforce "Lead" object:
  • For "Send Audiences To"
    • Field Type: Text Area (Long)
    • Field Label: Lytics Audiences
    • Field Length: 32,768 characters (32 KB)
    • Field Visible Lines: 3
    • Field Name: Lytics_Audiences
    • Field Description: This user is a member of these Lytics Audiences
    • Visibility: Checked for all users
    • Read-Only: Not checked for any users
    • Layouts: Add to all available
  • Optional: For "Send Content Affinity To"
    • Field Type: Text Area (Long)
    • Field Label: Lytics Content Affinity
    • Field Length: 32,768 characters (32 KB)
    • Field Visible Lines: 3
    • Field Name: Lytics_Content_Affinity
    • Field Description: The top three kinds of content this user prefers
    • Visibility: Checked for all users
    • Read-Only: Not checked for any users
    • Layouts: Add to all available
  • Optional: For "Send Scores To" (optional)
    • Field Type: Text Area (Long)
    • Field Label: Lytics Scores
    • Field Length: 32,768 characters (32 KB)
    • Field Visible Lines: 3
    • Field Name: Lytics_Scores
    • Field Description
    • Visibility: Checked for all users
    • Read-Only: Not checked for any users
    • Layouts: Add to all available

duplicate rule screen

API Limitations

Salesforce has limitations for the maximum number of daily API Calls. An API call is a connection made to a Salesforce server on your account's behalf. Lytics provides some guidelines below for working with these limits for your integration connection.

  • Different accounts have different limits on the number of API calls allowed per 24 hours. You can find more information about these limits in the Salesforce documentation.
  • In addition to your Lytics integration, your Sales team may have additional integrations using the Salesforce API. For example, they may use a tool to capture LinkedIn information and send it into Salesforce, which would also use their API.

To estimate an appropriate number of API calls to enter for the Salesforce import, Lytics recommends you use the following formula:

(Total Daily API Calls Allowed - Daily API Calls For Other Integrations) / 2

Dividing by two allows you to allot the same number of API calls to the upcoming Salesforce Export.

To roughly estimate how long your initial import will take, use the following formula:

(Total Leads + Total Contacts + Total Opportunities + Total Accounts) / Total Daily API Calls Allowed for Lytics Import

This will yield the approximate number of days that will be required.

Note: this estimate will be slightly low because each time the import encounters an API limit, it sleeps for 24 hours rather than restarting at the same time the following day.