Skip to main content
Salesforce integration
Jenny avatar
Written by Jenny
Updated over a year ago

Salesforce is a 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 version 1 of the integration (with updates coming), we can:

  • Sync conversation data to tasks

  • 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.

On the Textline side, our Salesforce integration is only available to Pro plan customers.

This integration is a bit different from most others, so 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 pop up 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:

  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 set up, 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 set up, 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. Make sure the check box for Active is ticked (it is by default)

    3. Click save

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

Note: The above is our default set up to work with Contacts and Leads. If you use Person Accounts instead, please reach out to Textline Support as we will need to give you different files and our engineering team will need to make some changes on the back end.

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:

  • One task per message (default)

  • One task per conversation

  • One case per conversation

One 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.

One 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).

One Case per Conversation

This option allows an organization to send Textline conversations to Salesforce through the cases object. When a conversation is created in Textline, a case will also be created in Salesforce for the relevant Salesforce Contact. Textline will then create a task for each message in the conversation and attach the task to the case. The statuses for the case will update as the Conversation proceeds so that you can keep track of what is new, working, or closed. Textline will also create a new Case Origin called Textline, so you can keep track of Textline made cases. The description of the case will include the name of the Textline department where the conversation is being held.

The tasks that are associated with cases look a bit different from the tasks above so that you can get a sense of the messages going back in forth in the case in the feed. These tasks will have a sample of the message body in the subject and the words Inbound or Outbound to dictate the direction of messaging.

Salesforce Widget

Textline can now become a widget within Salesforce! There are a few steps to this process, so if you're interested, please text us at +1 (415) 849-4349 or email us at [email protected] for more info.

Did this answer your question?