Você está na página 1de 7

Pervasive Software

Integration Design Specification


Twilio and Salesforce Integration

Integration Design Specification

Table of Contents
1. Introduction .............................................................................................................................................. 3 1.1 Purpose ............................................................................................................................................... 3 1.2 Project Scope ...................................................................................................................................... 3 1.2.1 Call or SMS to Activity .................................................................................................................. 3 2. Call or SMS to Activity ............................................................................................................................... 4 2.1 Call or SMS to Activity Workflow .................................................................................................... 4 2.2 Call or SMS to Activity Object Fields ............................................................................................... 5 2.3 Un-Mapped Leads to Leads Fields .................................................................................................. 5 2.4 Salesforce Activity Example ............................................................................................................ 5 2.5 Salesforce Activity Screenshot ........................................................................................................ 6 3. Call or SMS to Lead ................................................................................................................................... 7 3.1 Call or SMS to Lead ......................................................................................................................... 7 3.2 Salesforce Lead Screenshot ............................................................................................................ 7

Integration Design Specification

1. Introduction
1.1 Purpose
The purpose of this document is to describe the functional and technical implementation details of the solution being developed for the Twilio to Salesforce Integration. This document will serve as the guide during solution development. Object Work flow Object Fields

1.2 Project Scope


The scope of this integration for the unidirectional build is to move Calls or SMS Message information from Twilio into Salesforce Activities. 1.2.1 Call or SMS to Activity This is a unidirectional integration where Calls or SMS Messages, in Twilio, will be added to a found Contact or Account as an Activity within Salesforce. In cases when a Contact or Account is not found a Lead will be created (optional). In addition Salesforce Activities will be related to Salesforce Campaigns if the Campaign includes the same number used to/from Twilio Users as part of the Campaign Name.

Integration Design Specification

2. Call or SMS to Activity


2.1 Call or SMS to Activity Workflow

https://api.twilio.com/2010-04-01/Accounts/ {auth}/Calls.xml?StartTime=2011-11-16

Twilio Call or SMS Message to Activity in SalesForce

https://api.twilio.com/2010-04-01/Accounts/ {auth}/SMS/Messages/?DateSent=2011-11-16

Start

Get parameters from DataCloud Account SID Auth Token LastRun DateTime

Extract Calls and SMS Messages from Twilio a

Read Each XML SMS or Call (Occurrence Read)

Any More SMS or Calls

No

Stop

Yes No Is the SMS or Call DateTime > LastRun DateTime Yes No Completed Is SMS or Call outbound Yes Extract to = contactphone from = companyphone

No Extract to = companyphone from= contactphone

Did user select Create lead when Contact or Account not found Lead option set to True

SMS or Call is inbound

Find Salesforce Contact or Account ID where phone= contactphone

Yes

No Create Lead

Found Contact or Account

Create Activity into Contact, Account or Lead

Find SalesPerson ID and Campaign ID where Name includes companyphone

Assigned To = Saleperson ID Related To = Campign ID Contact/Account/Lead = Contact ID

Yes

Parameters are stored by account in our DataCloud Platform and are accessible by the integration at run time. These parameters will include Twilio Account SID, Twilio Auth Token, Integration Last Run DateTime, Salesforce Username and Salesforce password (should include Salesforce security token). Duplicates will not occur since all events with a DateTime earlier than our Integration Last Run DateTime will not be processed.

Integration Design Specification

2.2 Call or SMS to Activity Object Fields

Twilio Call Fields Call or SMS(based on request) StartTime Direction & To or From (Lookup Salesforce User ID based on inbound or outbound) To or From(Lookup Salesforce Campaign based on inbound or outbound) Direction & To or From & Duration & Status & Recordings Subject Due Date Assigned To Related To Comments

Salesforce Activity Fields

2.3 Un-Mapped Call or SMS to Activity Fields

Twilio
Sid ParentcallSid DateCreated DateUpdated AccountSid PhoneNumberSid EndTime Price AnsweredBy ForwardedFrom CallerName

Salesforce
Status = Set by user during setup Priority = Set by user during setup Set Notification Email

2.4 Salesforce Activity Example


a. Incoming Call Comments
Inbound Call from: 5126985046 Duration: 6 min Status: Completed Recording 1: url Recording 2: url

b. Outgoing Call Comments


Outbound Call to: 5126985046 Duration: 1 min Status: No answer Recording 1: url

c. Incoming SMS Comments


Inbound SMS: 5126985046 This is the body of the incoming text

d. Outgoing SMS Comments


Outbound SMS: 5126985046 This is the body of the outgoing text

Integration Design Specification

2.5 Salesforce Activity Screenshot


Inbound Call

Inbound Text

Integration Design Specification

3. Call or SMS to Lead


3.1 Call or SMS to Lead

Twilio Call Fields CallerName CallerName To or From To or From(Lookup Salesforce Campaign based on inbound or outbound) Last Name Company Phone Campaign

Salesforce Activity Fields

3.2 Salesforce Lead Screenshot

Você também pode gostar