Outlined below is a sample deflection API call that is used to execute a single step deflection flow using the LiveDeflect middleware solution. This will trigger an outbound message to a user and will also pass through any contextual information about the user into LiveEngage, which will be viewable by messaging agents.


Method URL
POST https://{domain}.ivrdeflect.liveperson.net/api/contextAndInvite

Request Headers

Key Value
Authorization See the RFC for more information
Content-Type application/json
Accept application/json

Request Payload

The following information should be provided to LivePerson.

Item Description Required
siteId LiveEngage Account ID e.g. 38856538 True
skill IVR Skill configured in LiveEngage e.g. sales True
customerCountryCode https://countrycode.org/ e.g. 1 (USA) True
customerPhoneNumber e.g. 4043438646 True
isMobile Is the customerPhoneNumber a mobile device?e.g. true/false, ALWAYS true True
deflectionAcceptTime Epoch time in seconds True
callBeginTime Epoch time in seconds True
externalCallId Brand’s identifier for caller e.g. 54651564 True
dialedCountryCode Country code consumer dialed True
dialedPhoneNumber Phone number consumer dialed True
deflectionChannel ALWAYS sms True
deflectionText Text to send to the consumer. If not supplied will default to LiveDeflect standard welcome message. False
deflectionHandle Callers phone number including country code True
callerInfo JSON dictionary of Key/Value Pairs False
callerEnteredDigits DTMF Digits entered in Brands IVR False
firstName String False
lastName String False
deflectionTextTag N/A False
externalCustomerIdDescriptor Description of Brands Customer ID (String). NOTE: Must be passed with externalCustomerId False
externalCustomerId Brands Customer ID (String). NOTE: Must be passed with externalCustomerIdDescriptor False

Example Payload

  "siteId": "38856538",
  "skill": "sales",
  "customerCountryCode": "1",
  "customerPhoneNumber": "4043438646",
  "isMobile": "true",
  "deflectionAcceptTime": "1528932953300",
  "callBeginTime": "1528932953100",
  "externalCallId": "1231",
  "dialedCountryCode": "1",
  "dialedPhoneNumber": "4029742345",
  "deflectionChannel": "sms",
  "deflectionText": "Welcome to our IVR Deflection solution",
  "deflectionHandle": "14043438646",
  "callerInfo": {"userdefinedvar":50,"newtestvariable":"variablevalue1","tshirtsize":"Large"},
  "callerEnteredDigits": "1234",
  "firstName": "John",
  "lastName": "Doe",
  "deflectionTagText": "template-1",
  "externalCustomerIdDescriptor": "CustomerId",
  "externalCustomerId": "123456"


Example Response on Success

The following information will be returned upon a successful call to LivePerson.

HTTP Response Code - 200 OK

  "callId" : "473513",
  "success" : "true"

Example Authentication Failure - No Header

The following information will be returned upon a failed call to LivePerson when no API keys are passed:

HTTP Response Code - 401 Unauthorized

  "error" : "No Authorization Header"

Example Authentication Failure - Invalid Nonce

```json { "error" : "Invalid Nonce - Nonce has been previously used" }