Activity Events

The following activity events can be specified as part of the request for creating a subscription.

Event Description

activityCreated

The event occurs when a new activity is created.

activityUpdated

The event occurs when the activity properties are changed.

activityStarted

The event occurs when the activity status is changed to started, that is, the resource has begun performing the activity.

activitySuspended

The event occurs when the activity status is changed to pending and a simultaneous new activity with the 'suspended' status is created duplicating the original activity.

activityCompleted

The event occurs when the activity status is changed to completed, that is, the activity is complete.

activityNotDone

The event occurs when the activity status is changed to notdone, that is, a started activity can't be completed for some reason.

activityCanceled

The event occurs when the activity status is changed to cancelled, that is, the activity has not been started and won't be performed.

activityDeleted

The event occurs when the activity is removed from the system. An activity can be deleted only from an inactive route.

Note:

When an activity is deleted from the system, the activityDeleted event does not return some fields (such as Custom properties and the country_code) regardless of the subscription settings.

activityDelayed

The event occurs when the end time of a started activity is changed to extend the activity duration.

activityReopened

The event occurs after creating a pending activity by duplicating a previously completed, cancelled, or incomplete activity.

activityPreworkCreated

The event occurs after creating an additional activity that's necessary to perform a pending activity. Preworks are created with the activity status as started.

activityMoved

The event occurs after an activity is reassigned to a different resource or date.

Event Fields

The activity events contain the following fields:

  • eventType: The type of the event, such as activityCreated, activityUpdated, and so on.
  • applicationId: The ID of the application that performed the operation which generated the event. It is only present if the operation was performed by an Application.
  • time: The time of the event in UTC time standard (string). The time format is YYYY-MM-DD HH:MM:SS.
  • user: The user who performed this event (string).
  • activityDetails: A record containing the following activity-related key fields. The date and time fields are in UTC standard time.
    • activityId: The identifier of the activity (integer). This is a mandatory field.

      Note:

      For the activityPreworkCreated event, the activityId field contains the identifier of the main activity for which the prework is created.
    • resourceId: The identifier of the resource to which the activity is assigned (string). This is a mandatory field. The field maps to the external_id field .
    • date: The date the activity is scheduled in the format YYYY-MM-DD. If the activity isn't scheduled, the value is NULL.
    • apptNumber: This field is used by integrations to hold the external ID of the activity. The external ID is the identifier of the activity in the origin system. This is an optional field.
    • customerNumber: This field is used by integrations to hold the external ID of the account. The external ID is the identifier of the account in the origin system. This is an optional field.
  • activityChanges: The list of activity fields that changed with the event. The fields have the same types and values as used in the GET, POST, and PATCH operations with a few exceptions. The time fields are in UTC standard time.