
Upgrade your Claris FileMaker solution with a Twilio integration to send out text messages and media files directly from FileMaker! Implementing Twilio with your solution makes for a seamless experience for both your business and your customers. Twilio can be used to send out MMS (multimedia messaging service) messages for anything your business needs: order confirmation, shipping notifications, and more.

Before You Start
Before you implement Twilio into your FileMaker solution, there are a few factors to consider like pricing and messaging regulations. Keep in mind that sending messages via Twilio will require you to pay a small monthly fee for your phone number, plus a fee for each message you send. A more detailed breakdown of Twilio's pricing can be found here.
You will also need to verify your newly purchased phone number with Twilio to comply with their terms of service. In addition to this, you will need to look into government regulations regarding text messaging in your area to make sure your business is compliant. These regulations may change frequently and vary depending on your area. For example, mobile carriers require you to register your phone number with TCR (The Campaign Registry) to combat spam messages. Twilio has integrated with TCR directly via their Trust Hub and can help facilitate the registration.
Account Setup
The first step in implementing Twilio in FileMaker is to create a Twilio account. Once your account is created, you will want to buy a number. This will be the phone number that sends out the text messages. Each number has an associated monthly fee. If you create a free trial account, you can use a Twilio phone number for free.

Phone Number Verification
Before you start sending out text messages, you will have to verify your new phone number. Twilio has government regulations they must follow regarding text message marketing, as their product is sending out text messages to real people. You will first need to submit a form to Twilio going into a little more detail about what your business does and how you will be using Twilio. Twilio will not let you send out messages from your phone number until it is verified. You can only send texts to the virtual phone on the Twilio website until then.

Authentication
The Twilio API used HTTP Basic authentication. You will need to plug in your Twilio account SID and auth token to this format:
https://{accountID}:{authToken}@api.twilio.com/2010-04-01/Accounts/{accountID}
Sending Messages
To clarify to the API that we want to send text messages, we must append /Messages.json
to the end of the URL for the final result of:
https://{accountID}:{authToken}@api.twilio.com/2010-04-01/Accounts/{accountID}/Messages.json
Before we send out our text, we must build the cURL to pass into the Insert From URL script step that we will use to call the Twilio API.
"curl -X POST " & {url} &
" --data-urlencode \"Body=" & {body} & "\" " &
" --data-urlencode \"MediaUrl=" & $image & "\" " &
" --data-urlencode \"From=" & {from} & "\" " &
" --data-urlencode \"To=" & {toNumber} & "\" " & "--dump-header {responseHeader}"
You will need three components to build out this cURL: the number you're sending the text from, the number you're sending the text to, and the contents of the message. There’s an optional fourth component you can add in for sending media files, the media url for the file you want to include with your text. Save your results to a variable, and then when you call the Insert From URL script step, the text message will be sent.

You can find Twilio's API documentation here for further information on using the Twilio API.

Conclusion
Twilio can add even more versatility to your Claris FileMaker Pro solution by strengthening communication with your customers. A direct line of communication will keep your customers well-informed. If you would like some help regarding a Twilio integration or anything else for your FileMaker solution, please contact us at DB Services and we would be happy to help.
Did you know we are an authorized reseller for Claris FileMaker Licensing?
Contact us to discuss upgrading your Claris FileMaker software.
Download the Claris FileMaker Twilio Integration for MMS File
Please complete the form below to download your FREE FileMaker file.