Complete activities

Overview

Use this API to complete multiple activities assigned to the logged in user. These activities may or may not have a case and the activities may belong to different cases. This API cannot be used to complete draft replies created for email and social activities.

For this API to execute successfully:

  • All activities must exist in the application.
  • All the activities must be assigned to the logged in user, and must be in "Assigned" status.
  • The activities must be of type Email, Social, Calltrack, Task or Generic (user created activity type). Chat and Web activities cannot be completed by this API.
  • If the value of the setting "Force activity categorization" for the department of the activity is "yes", the activity must be classified with a category (as configured in the application).
  • If the value of the setting "Force resolution code" for the department of the activity is "yes", the activity must be classified with a resolution code (as configured in the application).
  • No more than 75 activities must be sent in one request.
  • None of the activities must be awaiting supervision, i.e., waiting for supervisor to accept or reject the activity.

As part of completing this API request:

  • The activities sent in the request are completed.
  • Upon completing an activity, the case of the activity is closed if there are no other open activities in that case.

Permissions

Actor Permission
User All of the following are required:
  • Must have "Complete" action on "Activity" resource.
  • All the activities must either belong to the logged in user's home department, or to a department in which the user is a foreign user.
Client Application No additional permission required.

Licenses

Actor License
User The logged in user must have the following licenses:
  • eGain Advisor Desktop or eGain MailPlus: To complete an email or social activity.
  • eGain Advisor Desktop or eGain CallTrackPlus: To complete a calltrack activity.
  • Any User License: To complete a task or generic activity. Refer Licenses section for more information.
Client Application No additional licenses required.
SecurityoAuthUser or oAuthClient
Request
header Parameters
Accept
required
string
Default: application/json

Content type accepted by client.

Enum: "application/json" "application/xml"
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
Request Body schema: application/json

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

Elements required in request body

"activities" element must be present in the request body. At least one "activity" element must be present in the "activities" element. Each "activity" element must contain the following elements:

Name Description
id ID of the activity.
lastModified Value of last modified date of the activity.

Optional elements allowed in request body

None

Array of objects (Activity)
Responses
200

OK

  • Successfully completed the activities sent in the request body.
400

Bad Request message

  • Any query parameter is sent in the request.
  • Any criteria for successful execution mentioned in the Overview and Request Body sections are violated.
401

Unauthorized

403

Forbidden

406

Not Acceptable

500

Internal server error

patch/activity/complete
Request samples
application/json
  • PATCH /core/casemgr/v3/activity/complete
  • This example demonstrates the following:
    • Completing multiple activities. In this example, two activities are completed.
{
  • "activity": [
    ]
}
Response samples
application/json
  • PATCH /core/casemgr/v3/activity/complete
  • This example demonstrates the following:
    • Completing multiple activities. In this example, two activities are completed.
    • Response representation when the case of one of the activities remains open, and the other activities' case is closed.
{
  • "activity": [
    ]
}