All Projects → twilio → Twilio Salesforce

twilio / Twilio Salesforce

Licence: mit
A Salesforce/Force.com library for communicating with the Twilio REST API and generating TwiML. Need help? Post your questions to http://getsatisfaction.com/twilio or email us at [email protected]

Labels

Projects that are alternatives of or similar to Twilio Salesforce

Sfdx Dreamhouse
Stars: ✭ 110 (-40.54%)
Mutual labels:  apex
Pytorch Imagenet Cifar Coco Voc Training
Training examples and results for ImageNet(ILSVRC2012)/CIFAR100/COCO2017/VOC2007+VOC2012 datasets.Image Classification/Object Detection.Include ResNet/EfficientNet/VovNet/DarkNet/RegNet/RetinaNet/FCOS/CenterNet/YOLOv3.
Stars: ✭ 130 (-29.73%)
Mutual labels:  apex
Custommetadataloader
Tool to help users bulk create and update custom metadata records in salesforce.com from a CSV file.
Stars: ✭ 142 (-23.24%)
Mutual labels:  apex
Node Lambda Log
Basic logging mechanism for Node 6.10+ Lambda Functions
Stars: ✭ 115 (-37.84%)
Mutual labels:  apex
Visualforce Table Grid
Flexible and highly customizable Visualforce table grid component. Salesforce.com Classic Look and Feel.
Stars: ✭ 126 (-31.89%)
Mutual labels:  apex
Dreamhouse Lwc
Sample application for Lightning Web Components on Salesforce Platform. Part of the sample gallery. Real estate use case. Get inspired and learn best practices.
Stars: ✭ 136 (-26.49%)
Mutual labels:  apex
Zippex
Native Apex Zip library for Salesforce.com
Stars: ✭ 106 (-42.7%)
Mutual labels:  apex
Eda
Education Data Architecture
Stars: ✭ 175 (-5.41%)
Mutual labels:  apex
Salesforce Lookup Rollup Summaries
Apex utility classes that makes it easy to write trigger that rollup on LOOKUP parent child relationships.
Stars: ✭ 126 (-31.89%)
Mutual labels:  apex
Automation Components
Automation Components are a collection of reusable and production-ready extensions that include invocable actions, flow screen components and local actions.
Stars: ✭ 141 (-23.78%)
Mutual labels:  apex
Sfdx Simple
Stars: ✭ 119 (-35.68%)
Mutual labels:  apex
Fflib Apex Common Samplecode
Samples application illustrating the Apex Enterprise Patterns library
Stars: ✭ 121 (-34.59%)
Mutual labels:  apex
Prettier Plugin Apex
Code formatter for the Apex Programming Language
Stars: ✭ 138 (-25.41%)
Mutual labels:  apex
Df12 Deployment Tools
Stars: ✭ 112 (-39.46%)
Mutual labels:  apex
Dreamhouse Sfdx
Salesforce Sample App part of the sample gallery. Real estate use case. Get inspired and learn best practices.
Stars: ✭ 164 (-11.35%)
Mutual labels:  apex
Testdatafactory
The ultimate Apex Test Data Factory 🏭
Stars: ✭ 108 (-41.62%)
Mutual labels:  apex
Attic Apex Malhar
Mirror of Apache Apex malhar
Stars: ✭ 131 (-29.19%)
Mutual labels:  apex
Salesforce Test Factory
SObject factory that can be used in unit tests to create test data.
Stars: ✭ 184 (-0.54%)
Mutual labels:  apex
Force Di
Generic DI library with support for Apex, Triggers, Visualforce and Lightning
Stars: ✭ 165 (-10.81%)
Mutual labels:  apex
Fast Reid
SOTA Re-identification Methods and Toolbox
Stars: ✭ 2,287 (+1136.22%)
Mutual labels:  apex

Deprecation Notice

Note: this library is deprecated and not recommended for new work. Please see the Twilio Salesforce documentation for new work with Twilio and Salesforce.

Twilio Helper Library for Salesforce

Get ready to unleash the power of the Twilio cloud communications platform in Salesforce and Force.com! Soon you'll be building powerful voice and text messaging apps in Apex and Visualforce.

With this toolkit you'll be able to:

  • Make requests to Twilio's REST API
  • Control phone calls and respond to text messages in real time with TwiML
  • Embed Twilio Client in-browser calling in your Salesforce and Force.com apps

Installation

We've made it easy to get started. Just grab the code from GitHub and deploy it to your Salesforce org with the included Ant script.

Quick Install: If you do not have the existing Twilio-Salesforce library installed, you can use this unmanaged package to install: v4.2.0 https://login.salesforce.com/packaging/installPackage.apexp?p0=04t1a000000AQzf

v3.2.0 https://login.salesforce.com/packaging/installPackage.apexp?p0=04ti0000000XkE0

If you have a previous version of Twilio-Salesforce library installed, you will need to use Ant to install/update:

  1. Checkout or download the twilio-salesforce library from GitHub.

    $ git clone [email protected]:twilio/twilio-salesforce.git
    
  2. Install the Force.com Migration Tool plugin for Ant, if you don't already have it.

  3. Edit install/build.properties to insert your Salesforce username and password. Since you will be using the API to access Salesforce, remember to append your Security Token to your password.

  4. Open your command line to the install folder, then deploy using Ant:

    $ ant deployTwilio
    

Now all the library code is in your org and you're ready to start coding!

Quickstart

Getting started with the Twilio API couldn't be easier. Create a Twilio REST client to get started. For example, the following code makes a call using the Twilio REST API.

Make a Call

This sample calls the to phone number and plays music. The from number must be a verified number on your Twilio account.

// Find your Twilio API credentials at https://www.twilio.com/user/account
String account = 'ACXXXXXXXXXXXXXXXXX';
String token = 'YYYYYYYYYYYYYYYYYY';

TwilioRestClient client = new TwilioRestClient(account, token);

Map<String,String> params = new Map<String,String> {
        'To'   => '9991231234',
        'From' => '9991231234',
        'Url'  => 'http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient'
    };
TwilioCall call = client.getAccount().getCalls().create(params);

Send an SMS

This sample texts Hello there! to the to phone number. The from number must be a number which you have purchased from Twilio. Unlike voice calls, SMS messages cannot be sent from a verified number.

String account = 'ACXXXXXXXXXXXXXXXXX';
String token = 'YYYYYYYYYYYYYYYYYY';
TwilioRestClient client = new TwilioRestClient(account, token);

Map<String,String> params = new Map<String,String> {
        'To'   => '+12316851234',
        'From' => '+15555555555',
        'Body' => 'Hello there!'
    };
TwilioSMS sms = client.getAccount().getSMSMessages().create(params);

Generate TwiML

To control phone calls, your application needs to output TwiML. Use TwilioTwiML.Response to easily create a TwiML document.

TwilioTwiML.Response r = new TwilioTwiML.Response();
TwilioTwiML.Play p = new TwilioTwimL.Play('https://api.twilio.com/cowbell.mp3');
p.setLoop(5);
r.append(p);
System.debug(r.toXML());
<Response><Play loop="5">https://api.twilio.com/cowbell.mp3</Play><Response>

Next Steps

The full power of the Twilio API is at your fingertips. Visit the full documentation for advanced topics.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].