End of conversation

Notify the channel provider that the conversation is finished.

A POST request to the channel provider indicating Medallia Conversations has terminated the conversation and includes a reason why.

Request URL

The API endpoint implemented by the Channel Adapter to accept messages from Medallia Conversations.

{customer-adapter-uri}/?access_token={access-token}
  • {customer-adapter-uri} is the Customer send message URL setting in the Medallia Conversations Custom Channel settings.

  • {access-token} is the API-Token setting in the Medallia Conversations Custom Channel settings. The token is free-form text, but Medallia recommends using a cryptographically-secure token such as a UUID or other random nonce value. For more information, see API-token.

Request headers

Content-Type: application/json

Additional custom headers can be defined in the Medallia Conversations Channel configuration.

Request payload

The sender_action with the value "conversation_ended" indicates that the conversation has concluded. The recipient:id specifies which conversation is ending. Medallia Conversations also includes the reason the conversation has ended.

{
    "recipient": { "id": "<RECIPIENT_ID>" },
    "sender_action": "conversation_ended",
    "reason": <REASON>
}

Request parameters

recipient:id string or integer requiredIdentifier unique to the respondent, such as phone number, email, or other channel-specific value. For phone numbers, the ID must be in E.164 format.
sender_action string requiredAlways "conversation_ended".
reason stringOne of:
  • complete — Conversation reached the "end dialog". Signal is sent after the last dialog message.

  • optout — Respondent opted-out during the conversation.

  • expired — Attempted to interact with an expired conversation. Signal is sent after "Expired conversation" dialog, if any.

  • failed — Some error happened.

  • sampling — Respondent excluded from survey due to Quarantine filter in sampling.

Response

A successful response from the adapter includes the respondent and message IDs.

HTTP/1.1 200 
status: 200 
content-type: application/json; 
charset=utf-8 
content-length: 28 
{
    "recipient_id": "<RECIPIENT_ID>", 
    "message_id": "<MESSAGE_ID>" 
}

Responses

ResponseDescription
200A successful response includes an array of the customer and message IDs.
  • recipient_id: The identifier for the recipient, as sent in the original request.

  • message_id: A unique identifier for the message, assigned by the channel adapter.

401Unauthorized