To send Textline messages using the Zendesk Support UI, you'll need to add and update some triggers within Support. The changes will enable any Support ticket with the tag Textline to send a text - but not an email - when an agent responds.
Public comment warning
Having Textline add messages to tickets as public comments instead of private notes (the default configuration) WILL send messages to contacts via email if you do not follow the steps below.
Turning off Email Triggers for Textline Tickets
Navigate to Triggers admin by clicking into Admin (Gear icon), then Objects and Rules, then Triggers (under Business Rules in the side menu).
Select the Notify requester of received request trigger. This trigger is created by default by Zendesk Support. If you have more than one or have edited it previously, you may need to do this once or check with your Zendesk Admin before proceeding).
Click Add Condition
Select Tags from the first drop-down
Select Contains none of the following from the second drop-down
In the final field, enter textline as the tag.
Click Save
Repeat steps 3 and 4 for the Notify requester of comment update trigger.
Now, to ensure that messages sent through Zendesk with the textline tag do send a text:
(If you have the assign a conversation or resolve a ticket trigger set up, skip to the next step):
Navigate to Webhooks admin by clicking into Admin (Gear icon), then Apps and Integrations, then Webhooks (under Webhooks in the side menu).
Click Create Webhook at the top right
Select Trigger or Automation
Under Add Details type in the following information:
Name: Textline - Zendesk Webhook
Description: An API call to assign Textline to perform an action based on a Zendesk Trigger
Endpoint URL: https://application.textline.com/api/conversations.json
Request Method: POST
Request format: JSON
Authentication: None
Click Create Webhook
Navigate back to the Admin tools, navigate to the Objects and Rules -> Business Rules section and click on Triggers.
Select Add trigger
Name your trigger Send Textline message
Under Meet ALL of the following conditions, click Add Condition, and set the following parameters:
Select Comment in the first drop-down
Select Is in the next drop-down
Select Public in the final drop-down
Under Meet ALL of the following conditions, click Add Condition again
Select Tags in the first drop-down
Select Contains at least one of the following in the next drop-down
Enter textline as the tag
Under Meet ALL of the following conditions, click Add Condition again
Select Update via in the first drop-down
Select Is in the next drop-down
Select Web form in the final drop-down
Under Actions, select Other and then Notify by -> Webhook. A second dropdown will appear and you will select Send text message (or whatever name you gave the webhook created above).
The target’s JSON body should look like the following:
{ "access_token": "YOUR_ACCESS_TOKEN",
"phone_number": "{{ticket.requester.phone}}",
"comment": {"body": "{{ticket.latest_public_comment}}"},
"zendesk_ticket_id": "{{ticket.id}}",
"group_uuid": "YOUR_DEPARTMENT_UUID",
"integrations": {"zendesk": {"trigger": false}},
"creator": "{{current_user.email}}"
}
To find your access token, click here. To find the department UUID, go to your department settings, click view on your department, and then copy the string after https://application.textline.com/department/ in your browser's URL bar.
Click Save in Zendesk
Head to Textline and your organization's Integration settings.
Enable the Integration Option for When messages are added to a Zendesk ticket, add them as a public comment, not a private note.
Click Save in Textline.
Voila! You can now send text messages from within Zendesk Support's comment box.
Access Token
To find the access token to use in the JSON Body above, head to your Textline account, click on Tools and Integrations, and then Developer API. You will find the access token within the API Credentials section: