New Open Channel Configuration

What’s about

XCALLY MOTION Open Channel allows you to interact with your customers using potentially any channel.

You can interact with a chat, messaging system, video or any other application: in fact, a received interaction can be routed inside a queue and the agents belonging to it can reply to messages through the Motion OmniDesktop interface.

Build your own Channel service

In this section, you find how to build your Open Channels.

Follow the next steps to learn:

  • how to receive messages from Motion to your Open Channel service

  • how to send messages to Motion from your Open Channel service

Receive messages from Motion

The API URL that Motion application uses to send a message is decided by you and it's written in the Reply URL parameter.

The HTTP POST method must be used.

Example

If you create a PHP file to handle the communication between XCALLY Motion and your desired service, remember that you can't access directly in $_POST but you need to add the following row in your code:

$_POST = json_decode(file_get_contents('php://input'), true);



 

The system will request your API endpoint by adding the following parameter in the body request:

PARAMETER

DESCRIPTION

PARAMETER

DESCRIPTION

body

Text of the message sent by Motion

Contact

CM Contact details:

  • firstName

  • lastName

  • tags

  • street

  • postalCode

  • city

  • country

  • dateOfBirth

  • description

  • phone

  • mobile

  • fax

  • email

  • url

  • facebook

  • twitter

AttachmentId

Attachment id (attachment filename is written in the body parameter)

Download attachments from Motion

The API returns a file stream and requires authentication

If the message contains an attachment (AttachmentId parameter is different by NULL) you can download the file using the following API:

https://YourMotionIpAddress/apidoc/#api-Attachments-download

Send messages to Motion

The API URL is auto-generated when you create a new Open Channel account and you can retrieve it from Settings tab.

The HTTP POST method must be used.

In the following table you can find the default parameters that you can use in the body of the request:

PARAMETER

DESCRIPTION

PARAMETER

DESCRIPTION

from

mandatory Customer Identifier (this paramenter will be use for contact search by the system)

body

mandatory Text of the message

mapKey

mandatory Contact Manager contact field where the system will perform the search

AttachmentId

Attachment id

In addition to default parameters, you can insert Contact fields as extra parameters in body request:

  • firstName

  • lastName

  • tags

  • street

  • postalCode

  • city

  • country

  • dateOfBirth

  • description

  • phone

  • mobile

  • fax

  • email

  • url

  • facebook

  • twitter

If you want to link a file to an incoming Open Channel message, remember first to upload the file and set the AttachmentId in the request body

 

For each message sent to Motion, the system will search the contact in the Contact Manager List and associate it to the Open Channel interaction. If the contact is not found, the system will create a new contact in the selected Contact Manager list, having the following properties:

  • Contact field value written in mapKey is equal to from request parameter

  • Contact firstName is equal to from request parameter

  • Contact phone is equal to from request parameter

  • All extra parameters (Contact field) written in the request will be set in the new Contact

Upload attachments to Motion

To upload a file, you need to use the following API:

https://YourMotionIpAddress/apidoc/#api-Attachments-create



As response body, the system will return the object just created and you can use the property id in the body of the request for creating a new Open Channel message.




Related pages