Create calltrack activity

Overview

Use this API to create a new calltrack activity. User can only create one activity at a time.

Permissions

Actor Permission
User All of the following are required:
  • User must have 'Create activity' action.
  • The activity must be created in either the user's home department, or a department in which the user is a foreign user.
  • If the activity is being assigned to a target user, that is, a user other than the one who is logged in:
    • The target user must be logged in.
    • The logged in user must have 'Transfer Activities' permission on the target user.
Client Application No additional permission required.

Licenses

Actor License
User The logged in user must have the following licenses:
  • eGain CallTrackPlus
  • If the activity is being assigned to a target user, that is, a user other than the one who is logged in:
    • The target user must have 'eGain CallTrackPlus' license.
Client Application No additional licenses required.
SecurityoAuthUser or oAuthClient
Request
query Parameters
anonymousCustomer
string

If provided, then created activity is not be linked to any customer. Optionally, contactPointData with an email address or phone number can be provided in request body.

Value: "yes"
header Parameters
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"
Accept
required
string
Default: application/json

Content type accepted by client.

Enum: "application/json" "application/xml"
Content-Type
required
string
Default: application/json

Media type sent by the client.

Enum: "application/json" "application/xml" "application/x-www-form-urlencoded" "multipart/form-data" "text/plain"
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

Name Description
department.name Name of the department in which the activity should be created.
type.value Type of the activity. Must be "call_track".
type.subtype.value Subtype of the activity. Must be one of the subtypes of calltrack configured in application. To find out the configured values in the system, use Get Activity Attributes API.
mode.value Must be "Inbound" or "Outbound".
subject or content Must have at least one of subject or content.
Customer Identifier Required only if anonymousCustomer query parameter is not present in the request URL.
Must have one of the customer identification parameters to identify the customer. Refer Customer Identification section for more details.
status.assigned.user.id or
status.assigned.user.name or
status.assigned.user.customAttributes
Required only if actor is client application.
User to whom the activity should be assigned. Refer 'Target User' section for more details.

Optional elements allowed in the request body

Name Description
case.id If case.id is not provided, the server creates a new case for this activity. If provided, this case must exist in the system and the activity is associated to the case.
priority Priority of the calltrack activity.
dueDate Due date of calltrack activity. Must be a future date.
subject Subject of calltrack activity.
attachments Attachments of the calltrack activity. Refer 'Attachments' section for more details.
customAttributes 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.
payload.calltrack.content Supported content type are "text" and "html". One or both can be provided.

Attachments Element

Each attachment must be present within a separate attachment element. It must have the following representation:

Elements required for attachment

Name Description
altId Alternate ID of the attachment.

Target User

Optionally, only one of the below attribute can be provided to assign the activity to another user. If none of these are provided, the server assigns the activity to the logged in user.

Name Description
status.assigned.user.id Id of the target user.
status.assigned.user.name Login Name of the target user.
status.assigned.user.customAttributes Any custom attribute that can uniquely identify the target user.

Customer Identification

If anonymousCustomer query parameter is not present in the request URL then one of the following elements must be provided to identify the customer. The identified customer must be present in system. If "Customer departmentalization" setting is enabled in the application, identified customer and the activity being created must belong to the same department.

Name Description
customer.id Id of the Customer.
customer.contacts.contact.id Contact Id of the customer.
customer.contacts.contact.phone.id or
customer.contacts.contact.postal.id or
customer.contacts.contact.email.id or
customer.contacts.contact.social.id or
customer.contacts.contact.website.id
Contact Point Id of the customer.
contactPointData Must be a valid email address or phone number. Refer Email Address definition for the valid email address format. Phone number must be numbers only. The email address or phone number must be associated with the customer in the application.
If "Customer departmentalization" setting is enabled in the application, there must be a customer with this email address or phone number in the department in which activity is being created.
Array of objects (link) >= 0 items

Link to the current activity.

object (_case)

Brief information about the cases of the activity.

object (department)

Department of the activity.

object (mode)

Mode of the activity.

object (type)

Type of the activity.

secure
boolean (secure)

Indicates whether the activity is secure or not.

sentOnBehalf
boolean (sentOnBehalf)

Indicates whether the activity was created by a customer on behalf of another customer.

object (status)

Status of the activity.

priority
string (priority)

Indicates the priority of the activity.

Enum: "1" "2" "3" "4" "5" "6" "7"
created
string <date-time> (created)

Date of creation of the activity.

object (created)

Activity creation details (user info).

lastModified
string <date-time> (lastModified)

Date of modification of the activity.

object (lastModifiedBy)

Details of the last modification of the activity (user info).

dueDate
string <date-time> (dueDate)

Due date of this activity.

subject
string (subject) <= 255 characters

Subject of this activity.

object (language)

Language of the activity.

object (userLastWorked)

User who last worked on this activity.

object (customer)

Customer of this activity.

object (classifications)

Classifications of the activity.

object (queue)

Queue associated with this activity.

object (attachments)

Attachments of this activity.

object (notes)

Notes of this activity.

contactPointData
string (contactPointData)

Contains the contact point information.

object (lastDepartment)

Information about the previous department of this activity.

object (issueType)

Issue type of the activity.

contentPurged
boolean (contentPurged)

Indicates whether the activity content is purged.

object (payload)

Payload of the activity.

object (customAttributes)

Custom attributes of the activity.

object (virtualAssistant)

Virtual assistant information.

object (channel)

Channel for the activity.

id
string (id)

Id of the activity.

Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

406

Not Acceptable

500

Internal server error

post/activity/calltrack
Request samples
application/json
  • POST /core/casemgr/v3/activity/calltrack
  • This example demonstrates the following:
    • Creating a calltrack activity for a new case with multiple attachments.
    • Using Email address as contactPointData in addition to the required elements.
    • Assigning the created activity to the logged in user.
{
  • "department": {
    },
  • "type": {
    },
  • "mode": {
    },
  • "contactPointData": "jhenry@customer.com",
  • "subject": "Summary of Phone call",
  • "attachments": {
    }
}
Response samples
application/json
{
  • "code": "400-101",
  • "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}