Salesforce Integration

Salesforce is an amazingly powerful software suite that helps build more meaningful and lasting relationships by connecting businesses with their customers across sales, customer service, marketing, communities, apps, analytics, and more.

Integrating with Salesforce is a great way to ensure that your contacts and text messages are available in your company's core software.  In our version 1 of the integration (with updates coming), we:

  • sync every conversation data to a task
  • sync your contacts between both platforms

Again this is version 1, so if you'd like to see the integration handle things a bit differently let us know.  We're currently taking suggestions on how to make the next version better!

Initiating the Integration

The current version of the Textline & Salesforce integration requires that you be on a Salesforce plan with API access, so by default that means your Salesforce instance must be in one of the Performance, Developer, Unlimited, or Enterprise edition plans.  If you are on Professional Edition, you can still gain API access, you just must buy access first.  You can read more on plans and API access in the Salesforce documentation here.

When it comes to Textline, our Salesforce integration is only available to Pro plan customers.

This integration is a bit different from most others, so make sure to pay close attention to the instructions below:

  1. From Textline, click the Settings tab > Tools & Integrations
  2. Click Salesforce
  3. Click Connect, and enter your Salesforce login information when prompted

Clicking Connect will popup the Salesforce window asking for authentication (if you didn't login in step 2, it will ask you to login in the popup).

Continuous Sync (APEX Code setup)

Once connected, Textline will pull in all of the contacts from Salesforce, but to continue syncing data from Salesforce, you will need to add some APEX code to your Salesforce account.  The code can be downloaded in the link at the bottom of the Salesforce Integration page in your account under the APEX Code header:

Image_2020-06-18_at_11.28.29_AM.png

  1. Unzip the file downloaded from your Textline account.  It will give you a folder filled with a few rich text files (RTF) containing code you will need to add to copy and paste into your Salesforce environment.
  2. Open up Salesforce Sales and head to the Setup page.
  3. In the Quick Find search bar to the top left, search for Apex Classes.  It will be listed underneath Custom Code.
  4. In the Apex Classes section, begin to copy and paste the code from the files each as a new Apex Class in the following order:
    1. TextlineTriggerWebhook
    2. TextlineTriggerWebhookTest
    3. TextlineCalloutMock
    4. TextlineLeadTriggerTest
    5. TextlineContactTriggerTest
    6. TextlineUserTriggerTest
  5. Once the Apex Classes are setup, in the Quick Find search bar at the top left, search for Object Manager.  Once there, you'll need to find each section listed below.
    1. Contact
      1. In Contact, find the Triggers menu to the left.
      2. In Triggers, click on New at the top right and copy/paste the code found in the TextlineContactTrigger file.
    2. Lead
      1. In Lead, find the Triggers menu to the left.
      2. In Triggers, click on New at the top right and copy/paste the code found in the TextlineLeadTrigger file.
    3. User
      1. In User, find the Triggers menu to the left.
      2. In Triggers, click on New at the top right and copy/paste the code found in the TextlineUserTrigger file.
  6. Once all Triggers are setup, the final step is to add Textline as a trusted site.  In Quick Find search for Remote Site Settings.
  7. In the center of the page, click New Remote Site.
    1. Name: Textline
    2. URL: https://application.textline.com
    3. Make sure the check box for Active is ticked (it is by default)
    4. Click save

That's it.  You should now see records start syncing!

Textline Conversations to Salesforce Tasks

Textline will also sync conversation info into Salesforce by adding tasks to the Salesforce Contacts that link with your Textline Contacts.  We can handle this in 2 ways:

  • 1 Task per Message (default)
  • 1 Task per Conversation

1 Task per Message

This option allows you to have every message from Textline show up as an individual task in Salesforce.  This helps for reporting efforts in Salesforce (# of outbound messages to close a deal, # of total messages per lead, etc) as well as just getting a general sense as to a Contact's message volume.

Task titles will be formatted to show the direction of the message:

New Textline message from Contact

New Textline message from Agent to Contact

The Task will then contain the message body and any attachments in the Task's comments/details section.

1 Task per Conversation

This option allows you to have every Conversation from Textline show up as one task in Salesforce.  This is an option to help reduce the noise created with the 1 Task per Message option above while still giving Salesforce users insight into the Contact's conversations in Textline.

Task titles will show the current state of the Conversation

Open Textline conversation in Department Name

Resolved Textline conversation in Department Name

Within the Task, the messages that form the Conversation will appear in the comment/details section with the direction (inbound or outbound), who sent the message, and when.  The timestamp for the message is in the UTC timezone.  Salesforce limits how many characters can be in this section, so if the Conversation is too long, it will be truncated.  All tasks with this option will also contain a link to see the Conversation in Textline (in case it is truncated).