Welcome! How can we help?

Using Salesforce Triggers


HomeSupport HubIntegrationsSalesforce › Using Salesforce Triggers
Last Updated: 06/03/2019

This article covers detailed Salesforce usage information.  We recommend you start by following the instructions in this article before proceeding. 

Once your CTM account has been linked to Salesforce, you can use triggers to customize record syncing and campaign associations between your accounts.  Using triggers with your Salesforce integration will allow you to:

  • Set specific conditions for when data should be sent to Salesforce
  • Select which object types should be updated
  • Create custom field mappings to determine where data will be inserted or updated in your Salesforce account
  • Automatically execute other actions, such as applying tags or sending notifications, alongside the record sync

 

Creating a Record Sync Trigger

This section will cover basic record sync trigger setup for your Salesforce integration.  To learn more about triggers and all of the options that can be used, see the full article here.

When you have finished creating your trigger, you can use the Test Mapping to test the trigger you have created against one of the activities in your CTM account.

  1. Navigate to Calls → Triggers.  If you do not already have a trigger in your account, you will be redirected to a setup page.  Otherwise, click New Trigger in the upper right.
  2. Enter a name and optional description for the trigger.
  3. Use the drop-down menu to select when this trigger should run.  For Salesforce, we recommend running the trigger at the end of the call to ensure all data is collected before it is sent to Salesforce.
  4. Use the toggle to enable this trigger for all activities in your account, or choose to select specific tracking numbers to use with this trigger.
  5. Click Save Changes.
  6. Click + Add Workflow.
  7. Use the “If all the following rules match” section to set rules for your trigger, such as first time callers only, or calls over a specific duration.
  8. Click Add Action and select Salesforce Record Sync.
  9. If you are using the legacy Salesforce integration (the “Enable Legacy Salesforce Integration” toggle is on in your Salesforce settings), the trigger will sync using the rules defined in your Salesforce settings.

    For this version, this will complete the trigger setup.  Click Save Changes.
  10. For the updated version of the Salesforce integration, check the Custom mapping box to configure your record sync.
  11. Use the drop-down menu to select how you want information to be sent to Salesforce:
    • Update only will only update an existing record.  New records will not be created.
    • Insert only will only create a new record.  No existing records will be updated.
    • Update or insert (upsert) will either create a new record or update an existing record.
  12. Use the Salesforce Object Mapping drop-down menu to select the type of object you would like to sync data to in Salesforce.
    • Advanced users may wish to configure an Advanced Custom SOSL Query instead.  For more information, see “Creating an Advanced Custom SOSL Query” below.
  13. If you wish to associate the Salesforce object you selected to the call or text in your CTM account, check “Associate to Call, Text, Form, etc…”
  14. If you wish to set an owner for the record (based on your Salesforce integration settings), check “Set record owner.”
  15. Click Add Field Mapping to begin creating your custom mappings.
  16. In the row that is added, select the following details:
    • The CTM field with data you wish to send to Salesforce
    • The Salesforce field where the data should appear
    • The default value to use if a value is not available (optional)
      • Click the edit button next to this field to see shortcut tokens that can be used here
    • Whether the record sync should always or never overwrite the selected Salesforce field
  17. Click Add Field Mapping to continue adding fields as needed.
  18. Click Save Changes.

 

Creating a Salesforce Campaign Trigger

This section will cover basic campaign link trigger setup for your Salesforce integration.  To learn more about triggers and all of the options that can be used, see the full article here.

  1. Navigate to Calls → Triggers.  If you do not already have a trigger in your account, you will be redirected to a setup page.  Otherwise, click New Trigger in the upper right.
  2. Enter a name and optional description for the trigger.
  3. Use the drop-down menu to select when this trigger should run.  For Salesforce, we recommend running the trigger at the end of the call to ensure all data is collected before it is sent to Salesforce.
  4. Use the toggle to enable this trigger for all activities in your account, or choose to select specific tracking numbers to use with this trigger.
  5. Click Save Changes.
  6. Click + Add Workflow.
  7. Use the “If all the following rules match” section to set rules for your trigger, such as first time callers only, or calls over a specific duration.
  8. Click Add Action and select Salesforce Campaign.
  9. By default, the Salesforce campaign selected will be based on the Tracking Source associated to the activity.  To use a specific campaign instead, check the box labeled “Link to specific Campaign.”
  10. Use the drop-down menu to select the campaign to link to the activity.
  11. Click Save Changes.

 

Creating an Advanced Custom SOSL Query

This setting is available when configuring a Salesforce record sync.  Configuring your own query allows you to specify your own rules for matching records between CTM and Salesforce.

Note: this setting requires advanced knowledge of SOSL query language.  Do not use this feature unless you are familiar with its usage.

  1. While configuring a Salesforce record sync (see instructions above), click the pencil icon next to the Salesforce Object Mapping field to open the Advanced Custom SOSL Query window.
  2. Click Add Query to and enter your custom query.  You can provide up to 3 queries. For example:
    1. FIND {555*555*5555 OR 1*555*555*5555 OR 555.*555.*5555} IN PHONE FIELDS RETURNING Account LIMIT 1
    2. FIND {who@example.com} IN EMAIL FIELDS RETURNING Account LIMIT 1
  3. Click Add Query to add up to three total queries.
  4. Use the drop-down to select a call from your account and click Test Query to confirm whether your query will work as intended.
  5. Click Save Changes.

Was this resource helpful?
0 0


X