All Classes Pages
EditCompletedActivityPage Class Reference

More...

Detailed Description

Edit Completed Activity

Overview

This API allows user to modify the content and custom attributes of a completed activity. Only one activity can be modified at a time.

For this API to execute successfully:

  • An activity with the ID specified in the request body must exist.
  • The status of the specified activity must be 'completed'.
  • It must be an email activity or a chat activity.
  • The activity content must not be provided if the content of the activity is already purged.
Since
12.0

APIs

Method URL Description
PUT /ws/v12/interaction/activity Modify an existing completed activity.

Authentication

Authentication is required. The client must be logged in to call this API. Each API request must contain X-egain-session request header returned by Login API.

Permissions

All of the following are required:

  • The user must have 'Manage completed activity' action on the 'Activity' resource.
  • The activity must either belong to the user's home department, or to a department in which the user is a foreign user.

Licenses

The logged in user must have the following licenses:

  • ECE MailPlus: To edit email activities.
  • ECE ChatPlus: To edit chat activities.

Request

Request headers

Name Description Allowed values Default value
X-egain-session Session ID obtained from Login API response header N/A N/A
Accept Content type accepted by client. application/xml or application/json N/A
Content-Type Media type sent 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

Request Body

The request body is mandatory. Request body can be in either XML or JSON format.

Elements required in the request body

Name Description
id ID of the Activity.
lastModified.date Value of last Modified date of the activity.
payload.chat.transcript.content or
payload.email.contents.content or
customAttributes
  • payload.chat.transcript.content specifies content of chat activity. Content type and content value must be provided. The content type must be "html".
  • payload.email.contents.content specifies content of email activity. Content type and content value must be provided. Supported content types are "text" and "html". One or both can be provided. The provided content must not have new inline attachment.
  • customAttributes specifies name 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.
NOTE: To remove value of any element, set the value to an empty string (instead of setting the value to null).

Optional elements allowed in the request body

   None

Request body XML schemas:

  • schema-interaction-activity-Activity

Supported API specific query parameters

   None

Supported common query parameters

   None

Response

Response headers

Name Description Possible values
X-egain-session ID of the current user session N/A
Content-Type Media type of response body application/xml or application/json

Response body XML schemas:

  • schema-kb-WSError - used in case of error

HTTP status codes

Success Status codes

204 - No Content

  • Successfully modified the completed activity.

Failure Status codes

400 - Bad Request

  • Any query parameter is sent in the request.
  • Request body does not contain the required elements.
  • Unsupported element is present in the request body.
  • Any criteria for successful execution mentioned in the Overview or Request Body sections are violated.
  • Request body is empty.

401 - Unauthorized

  • X-egain-session request header is missing.
  • Session is invalid or expired.

403 - Forbidden

  • If the user does not have the appropriate permissions for this operation. Refer the Permissions section.

406 - Not Acceptable

  • Invalid 'Accept-Language' header value.

409 - Conflict

  • The lastModified date of the activity in the request does not match its lastModified date on the server.

500 - Internal server error

Examples:

Example 1 - Modify completed chat activity with required attributes and content
Example 2 - Modify completed chat activity with all attributes
Example 3 - Modify completed email activity with required attributes and content
Example 4 - Modify completed email activity with all attributes