Twilio Studio Flows (Advanced)
Table of Contents
If you checked the box to Enable Twilio Studio Flows when you set up the integration, the Twilio Studio Flows feature and additional options are available throughout the app.
Notes:
- This feature is very technical in nature, and is not for everyone. Syncro's Technical Support will not be able to assist you in configuring this feature, and you may need to hire a developer to help you get it right.
- We recommend reading over Twilio's Studio User Guide.
Overview
Here's a basic overview of the integration:
- Your account will send a JSON payload with basic information about the resource you are sending over. For example, appointment confirmations will send over the appointment time/date.
- You can add additional fields to the JSON payload as you see fit. In other words, if Syncro didn't include the information you need by default, you can include it.
- This data can also support template tags (wherever possible).
On each of these, you'll notice you can add your own custom data. Syncro will also send some data in the JSON payload by default to help you. For example, here's what Appointment Reminders send over:
To access this data in a Twilio Studio flow, you'll need to use the {{flow.data}} tag. For example, if you want to access the customer name field above, use the tag {{flow.data.customer.name}}.
To access custom fields, you'll still use the {{flow.data}} tag. For example, to access the value "example data" stored under “example,” use {{flow.data.example}}.
Note: Read more about using variables in Twilio Studio Guide.
Appointment Confirmations
Appointment Reminders have the option to trigger a Twilio Studio Flow.
You can trigger a flow X hours before an appointment, along with the morning of/night before:
Additionally, Syncro has an API endpoint to trigger to update an appointment about whether an appointment was confirmed by a customer.
The endpoint is: /api/v1/twilio/appointment_confirmation
Required Parameters:
- token: This is the Required Security Token found on the BYO Twilio app page.
-
appointment_id: This is the appointment's ID you want to update.
- Can be accessed through {{flow.data.appointment.id}} on this appointment reminder trigger.
-
appointment_action:
- confirm - Updates a linked ticket to reflect that the appointment was confirmed in a private Ticket Comment.
- cancel - Updates a linked ticket to reflect that the appointment was cancelled in a private Ticket Comment.
Notification Center
You can setup Twilio Studio Flows to trigger when a notification is triggered.
You can setup one Twilio Studio Flow per notification set, but you can trigger it with as many events as you would like.
Mailer
With Mailer, you can SMS and/or trigger a Twilio Studio Flow to follow-up with your customers. You are not restricted to e-mails.
Ticket Automation
With Twilio Studio Flows enabled, you have the option to trigger a Studio Flow as an Action in a Ticket Automation. Without Twilio Studio Flows enabled, you will still get the option to SMS the customer/contact, or send a manual SMS. Template Tags are also supported here.
Automated Remediation
Like Ticket Automation, Automated Remediation receives a new Action to trigger a Twilio Studio Flow.
It also receives the option to SMS the Customer/Contact, or to send a manual SMS without enabling Twilio Studio Flows.
Twilio Studio Flow Templates
Here are some Twilio Studio Flow templates you can add to your Twilio account. Feel free to add/edit them to fit your needs.
Note: Learn more about how to import these JSON flows into your Twilio account.
Simple Appointment Reminder
This Studio Flow is a great one to try first. Hook it up to an appointment reminder schedule setup to alert 1 hour before an appointment will start, and it will SMS the customer a heads up that the assigned tech will be there soon. As a bonus, it also sends a picture of the tech found on their users page so the customer knows who it is.
Here's an example from Jon Snow the technician:
Get the Simple Appointment Reminder Studio Flow
Appointment Reminders Confirmation
This Studio Flow is great to use if you would like your customer to confirm or deny an appointment reminder.
It will SMS the customer and greet them by name, and give them a reminder about when their appointment is scheduled. The customer can respond with a 'C' to confirm the appointment, or 'X' to cancel the appointment. If the appointment has a ticket attached, their response will update the attached ticket with a Private Ticket Communication/Comment on whether they confirmed or cancelled the appointment.
Get the Appointment Reminders Confirmation Studio Flow
Log Inbound Call
This Studio Flow:
- Takes an inbound call,
- Searches for a customer in your account with the same phone number,
- Logs the call under the "Communications" tab on the Customer's page,
- Pops up a message at the bottom of your screen that indicates a call is inbound, and then
- Forwards the call to a number you specify.
Note: This Studio Flow uses the PBX security token as a parameter in order to work. You can find this token under the FreePBX app card in the App Center. Learn more about the PBX integration.
Get the Log Inbound Call Studio Flow
Twilio Functions
Here are some Twilio functions you can add to your Twilio account. Feel free to add/edit them to fit your needs.
IMPORTANT: For the Twilio Studio Flow templates, are fields you need to update. We've prefaced these fields with “replace-me” to make them easy to find and update. For example, “replace-me-subdomain” means you should delete “replace-me-subdomain” and replace it with your Syncro account's subdomain.
Tech Hunt
Want to call your techs until one answers the phone? Try this.
Play a Song Over a Call
Pretty neat example of how to greet your customers.
Other Functions
There is a whole repo of ideas here. Try them out!
Troubleshooting Studio Flows
If your Studio Flow isn't working, try these troubleshooting tips:
- Navigate to the Studio Dashboard in Twilio, to see logs for each of your flows. This should give you helpful information on whether the issue is on your side, or on the Twilio side. In the logs, you can see the flow data sent over to Twilio. Check this out to see what the JSON flow data is, and how you can access it.
- Make sure your web requests to your Syncro account has your Required Security Token. Without this token, the request will fail.
- Twilio has a debugger, check it out for fails! Twilio will also email you when there is a failure on any of your flows by default.
- There can only be one active execution running at a time for a phone number (per flow). You should check your Twilio Studio Flow Executions under the Logs for that Flow to see more.