Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
81 lines (62 loc) · 2.55 KB

File metadata and controls

81 lines (62 loc) · 2.55 KB

Set SLA Policy to Inquiry

Set SLA policy to an inquiry.

{% hint style="info" %}

  • It requires either the view-l-room or manage-livechat-sla permission.
  • You can only set the policy for an inquiry that has not been taken by an agent. {% endhint %}
HTTP MethodURLRequires Auth
PUT/api/v1/livechat/inquiry.setSLAyes

Body Parameters

KeyExample ValueDescription
roomId*ZDYMFPpvnXgptmzMsThe room ID.
sla*6417f67528384134ed600dc6Name or ID of the SLA policy.

Example Call

curl --location --request PUT 'http://localhost:3000/api/v1/livechat/inquiry.setSLA' \
--header 'x-auth-token: fjiPBhtyFAn5JO3RDdDvKjkXToV2pd4_lb-nkdgJ_Q4' \
--header 'x-user-id: rbAXPnMktTFbNpwtJ' \
--data '{
    "roomId":"ZDYMFPpvnXgptmzMs",
    "sla":"6417f67528384134ed600dc6"
}'

Example Response

Success

{
    "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: Occurs when the authenticated user neither has the view-l-room nor manage-livechat-sla permission.
  • Invalid Inquiry: This occurs when the inquiry is invalid.

{% tabs %} {% tab title="Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "User does not have the permissions required for this action [error-unauthorized]"
}

{% endtab %}

{% tab title="Invalid Inquiry" %}

{
    "success": false,
    "error": "error-invalid-inquiry"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
5.0.0 Added