You want to integrate your Salesforce.com data with a telephony system, but don't know where to start.
This example gives you a starting point for Force.com Sites to host your Twilio Markup Language (TwiML) page(s). Before getting started, you need:
Now let's create the Twilio Hello World example. First, create a Visualforce page that serves up TwiML. For example, call the page TwilioHelloWorld.
<apex:page contentType="text/xml" sidebar="false" showheader="false">
Now you need to create a Force.com Site to host the page. See instructions here for creating a Force.com Site. Set your TwilioHelloWorld page as the Active Site Home Page, and remember to activate your site.
Now use your Force.com Site URL as the Voice URL for your Twilio Account Phone number. The Site URL should look something like this:
Once you have saved this in Twilio, try it out by dialing your new number. Note that if you're using a Twilio Sandbox number you will need to enter your pin, but if you purchase a number ($1 per month per number), no PIN is necessary.
Other use cases for integrating Salesforce.com and Twilio:
- Interactive voice response (IVR) that does Account look up based on Case Number/Customer ID.
- Automatic Contact identification by Caller ID referencing the contact phone numbers.
- No PIN required conference bridging.
- Sending SMS messages to sales teams when new Leads arrive.
Other recipes that you may find interesting: