This API allows client applications to create a new conversation. The conversation can be created with, or without a customer.
A new customer will be created if a customer with provided details does not already exist in the application.
This is used for Asynchronous messaging. Refer Asynchronous messaging for more details.
For this API to execute successfully:
As part of completing this API:
Method | URL | Description |
---|---|---|
POST | /ws/v19/clientapplications/messaging/conversation/start?anonymousCustomer=yes | Creates a new conversation without a customer. |
POST | /ws/v19/clientapplications/messaging/conversation/start?searchContactOnAttribute={value} | Creates a new conversation for a customer. The customer will be identified based on value provided for the query parameter "searchContactOnAttribute". Refer the section Supported API specific query parameters for more details about the query parameter "searchContactOnAttribute". |
Authentication is required. Only authenticated client applications of type 'Chat' are allowed to access this API. This API must contain the access token returned by the Authentication API.
The client application must be configured to use the entry point provided in request.
N/A
Name | Description | Allowed values | Default value |
---|---|---|---|
Authorization | Access token for the client. The value must be "Bearer" followed by access token. To elaborate, the value must be "Bearer <access_token>" | N/A | N/A |
Content-Type | Media type sent by the client. | application/xml or application/json or multipart/form-data | N/A |
Accept | Content type accepted by the client. | application/xml or application/json | N/A |
Accept-Language | Language locale accepted by client (used for locale specific fields in resource representation and in error responses) | Supported 'Accept-Language' header codes | default system language |
The request body is mandatory. Request body can be in either XML or JSON format.
Name | Description |
---|---|
entryPointConfiguration.entryPoint.id | Entrypoint ID which will be used for starting chat conversation. |
entryPointConfiguration.lastModified.date | The date when the entry point configuration was last modified. |
Name | Description |
---|---|
activity.case.id | The case ID with which the conversation has to be associated with. If case.id is provided:
|
activity.subject | Subject of the conversation, in plain text. Must be at least 1 character, and must not exceed 255 characters. |
activity.payload.chat.clientInfo.timeOffset | End user time zone offset. |
activity.payload.chat.clientInfo.referrerName | Referrer name |
activity.payload.chat.clientInfo.referrerURL | Referrer URL |
activity.payload.chat.clientInfo.isRichTextSupported | This indicates whether client supports rich text. If client does not support rich text, the application will send messages in plain text. Below are the allowed values:
|
activity.customAttributes | Custom attributes for the activity being created as part of this conversation. Name must match one of the custom attributes configured in application. If the custom attribute is configured as an enumeration, the value must be one of the predefined values. For string type of custom attribute that is not configured as an enumeration, refer list of Allowed Characters For Custom Attributes. |
activity.customer | This must be provided if the query parameter "searchContactOnAttribute" is provided. This must not be provided if the query parameter "anonymousCustomer" is provided. If a customer is not found using the value of the query parameter "searchContactOnAttribute", a new customer will be created using the provided values. Otherwise, this attribute is ignored. Custom attributes for the contact can also be provided |
Only one of the below mutually exclusive parameters must be provided:
Name | Description | Allowed values | Default value |
---|---|---|---|
anonymousCustomer | Indicates whether the conversation is for an anonymous customer. |
| N/A |
searchContactOnAttribute | This parameter indicates the attribute of the contact, on which customer records will be looked up. The attribute corresponding to the provided value must exist in the customer representation. Eg: If provided value is "externalId", the contact in the customer representation must contain externalId. If "Customer departmentalization" setting is enabled, this API will search the customer in the department of the entry point, otherwise it will search the customer across the application. If a customer with the value of this attribute does not exist, a new customer will be created using the customer details provided in the customer element. |
| N/A |
The below optional parameter can be provided:
Name | Description | Allowed values | Default value |
---|---|---|---|
sendTypingNotification | This indicates whether notifications about the below agent actions have to be posted on the callback URL:
|
| no |
conversationContact | The contact to be used for the conversation. This can be provided only if the query parameter "searchContactOnAttribute" is provided. If this parameter is not provided, the activity created for this conversation will not be associated with any contact point. The attribute corresponding to the provided value must exist in the customer representation. Eg: If provided value is "email.emailAddress", the contact in the customer representation must contain an email contact point. |
| N/A |
None
Name | Description | Possible values |
---|---|---|
Content-Type | Media type of response body | application/xml or application/json |
200 - OK
400 - Bad Request
401 - Unauthorized
403 - Forbidden
406 - Not Acceptable
500 - Internal server error
Example 1 - Start conversation with required attributes
Example 2 - Start conversation with all attributes
Example 3 - Start conversation with all default attributes
Example 4 - Start conversation with required attributes for anonymous customer
Example 5 - Start conversation with all attributes for anonymous customer
Example 6 - Start conversation with default attributes for anonymous customer