Collaboration Events

The following collaboration events can be specified as part of the request for creating a subscription:

Event Description Event Fields

chatMessageSent

The event occurs whenever a message is sent through Collaboration. When video chat is used, the video_chat_started and video_chat_finished values are updated when the video chat is initiated and finished respectively. Information related to video chat (duration, session id) will be sent in the videoChatInfo object.

The chatMessageSent event contains the following fields:

  • eventType: The type of the event that is, chatMessageSent.
  • time: Time of event in UTC time zone (string). The time format is YYYY-MM-DD HH:MM:SS.
  • user: The user who triggered this event (string).
  • chat: A record containing the following chat/broadcast related key fields.
    • chatId: The identifier of the chat/broadcast (string). This is the unique id for each chat/broadcast in the collaboration server.
    • startedBy: The user who started the chat/broadcast (string).
    • startedTime: Time (in UTC time zone) when the chat/broadcast was started (string). The time format is YYYY-MM-DD HH:MM:SS.
    • helpdeskName: The name of the helpdesk (string). The field is available only for helpdesk chats.
    • type: Type of broadcast (string). The values are group:broadcast, location:broadcast, and activity:broadcast. The field is available only for broadcasts.
    • expireTime: Time when the broadcast expires (string). The time format is YYYY-MM-DD HH:MM:SS. The field is available only for broadcasts. The value is not available for broadcasts without expiry.
  • messsage: A record containing the following message related key fields.
    • messageId: The identifier of the message in the collaboration server (long).
    • sequenceNumber: The sequence number of the message in the chat/broadcast (long).
    • text: The text content of the message (string).
    • needAcknowledgement: The field indicating if acknowledgement is enabled for this message (boolean). The field is available only for broadcasts. It is not available for messages without acknowledgement option.
    • systemMessage: This field is present only for video chat events and can contain the following values:
      • video_chat_started: Triggered when an user starts a video chat.
      • video_chat_finished: Triggered when an user finishes a video chat.
    • videoChatInfo: This record is present only for video chat events and can contain the following fields:
      • sessionID: A unique identifier used to identify the video chat session.
      • duration: Indicates the duration of video chat in seconds. This field is present only for the video_chat_finished system message.
    • attachment: Record containing the attachment related key fields. The field is not available if there is no attachment.
    • transaction: Record containing the transaction related key fields. The field is not available if there is no transaction.
  • participants: A record containing the details of the participants in the chat/broadcast. This field is available only when the message is the first message of a chat or a broadcast. Each participant is represented using the following fields:
    • name: Name of the participant (string).
    • login: User login of the participant (string).
    • invitedBy: User login of the user who invited this participant to chat (string).
    • invitedTime: Time when this participant was invited to chat (string). The time format is YYYY-MM-DD HH:MM:SS.

chatUpdated

The event occurs when:
  • a user joins or leaves a chat/broadcast
  • a chat is moved or ended
  • a broadcast is ended

The chatUpdated event contains the following fields:

  • eventType: The type of event (string) that is, chatUpdated.
  • time: Time of event in UTC time zone (string). The time format is YYYY-MM-DD HH:MM:SS.
  • user: The user who triggered this event (string).
  • chat: A record containing the following chat/broadcast related key fields:
    • chatId: The identifier of the chat/broadcast (string). This is the unique id for each chat/broadcast in the collaboration server.
    • startedBy: The user who started the chat/broadcast (string).
    • startedTime: Time (in UTC time zone) when the chat/broadcast was started (string). The time format is YYYY-MM-DD HH:MM:SS.
    • helpdeskName: The name of the helpdesk (string). The field is available only for helpdesk chats.
    • endedTime: Time (in UTC time zone) when the chat/broadcast was ended (string). The time format is YYYY-MM-DD HH:MM:SS. The field is not available if the chat is not ended.
    • type: Type of broadcast (string). The values are group:broadcast, location:broadcast, and activity:broadcast. The field is available only for broadcasts.
    • expireTime: Time when the broadcast expires (string). The time format is YYYY-MM-DD HH:MM:SS. The field is available only for broadcasts. The value is not available for broadcasts without expiry.
  • participant: A record containing the details of the participant whose fields changed. This field is not available if no participant related data was changed. The record contains the following fields:
    • name: Name of the participant (string).
    • login: User login of the participant (string).
    • invitedBy: User login of the user who invited this participant to chat/broadcast (string).
    • invitedTime: Time when this participant was invited to chat/broadcast (string). The time format is YYYY-MM-DD HH:MM:SS.
    • leftTime: Time when this user left chat/broadcast (string). The time format is YYYY-MM-DD HH:MM:SS. The field is not available if the participant has not left the conversation.

broadcastStatusUpdate

The event occurs when the broadcast status of a participant is changed.

The broadcastStatusUpdate event contains the following fields:

  • eventType: The type of event (string) that is, broadcastStatusUpdate.
  • user: The user who triggered this event (string).
  • time: Time of event in UTC time zone (string). The time format is YYYY-MM-DD HH:MM:SS.
  • statusChanges: A record containing an array of status update records. Each status update record is a map with the following fields:
    • login: Login of the user whose status is changed (string).
    • chatId: The unique identifier of the broadcast in the collaboration server (integer).
    • messageId: The identifier of this message for which the status is changed (long).
    • status: The status change (string). The values are UNDELIVERED, DELIVERED, READ, ACKNOWLEDGED, ACCEPTED, and REJECTED.

transactionUpdated

The event occurs whenever an operation is done on a transaction through Collaboration. A transaction through Collaboration is the transfer of an inventory or activity through chat.

The transactionUpdated event contains the following fields:

  • eventType: The type of event (string) that is, transactionUpdated.
  • time: Time of event in UTC time zone (string). The time format is YYYY-MM-DD HH:MM:SS.
  • user: The user who triggered this event (string).
  • chat: A record containing the following chat/broadcast related key fields:
    • chatId: The identifier of the chat/broadcast (string). This is the unique id for each chat/broadcast in the collaboration server.
    • startedBy: The user who started the chat/broadcast (string).
    • startedTime: Time (in UTC time zone) when the chat/broadcast was started (string). The time format is YYYY-MM-DD HH:MM:SS.
    • helpdeskName: The name of the helpdesk (string). The field is available only for helpdesk chats.
    • endedTime: Time (in UTC time zone) when the chat/broadcast was ended (string). The time format is YYYY-MM-DD HH:MM:SS. The field is not available if the chat is not ended.
    • type: Type of broadcast (string). The values are group:broadcast, location:broadcast, and activity:broadcast. The field is available only for broadcasts.
    • expireTime: Time when the broadcast expires (string). The time format is YYYY-MM-DD HH:MM:SS. The field is available only for broadcasts. The value is not available for broadcasts without expiry.
  • messsage: A record containing the following message related key fields:
    • messageId: The identifier of the message in the collaboration server (long).
    • sequenceNumber: The sequence number of the message in the chat/broadcast (long).
    • text: The text content of the message (string).
    • needAcknowledgement: The field indicating if acknowledgement is enabled for this message (boolean). The field is available only for broadcasts. It is not available for messages without acknowledgement option.
    • attachment: Record containing the attachment related key fields. The field is not available if there is no attachment.
    • transaction: Record containing the transaction related key fields. The field is not available if there is no transaction.

The following is the structure of the attachment field in the collaboration events:

  • attachmentb: A record containing the following attachment related fields:
    • attachmentId: The identifier of the attachment (integer) that is used to store this attachment in the field collaboration server.
    • type: The type of the attachment (string). The values are activity, inventory, resource, image, or location.
    • desc: The description of the entity shared (string).
    • latitude: The latitude of the location shared (string). This field is available only for location sharing.
    • longitude: The longitude of the location shared (string). This field is available only for location sharing.
    • filename: The name of the image file shared (string). This field is available only for image sharing.
    • downloadUrl: The URL used to download the shared image (string). A GET request to this URL with authentication of a user with read access to collaboration events will get the image. This field is available only for image sharing.
    • activityId: The identifier of the activity with which the shared entity is related (integer). This field is available only for inventory and activity sharing/transfer. The value is zero if the entity is not related to any activity.
    • date: The date of the activity shared/transferred (string). This field is available only for activity sharing/transfer. The date format is YYYY-MM-DD.
    • resourceId: The external identifier of the resource (string). This field is not available for location and image sharing. The value is an empty string if the entity is not related to any resource.
    • resourceInternalId: The internal identifier of the resource (integer). This field is not available for location and image sharing. The value is zero if the entity is not related to any resource.
    • inventoryType: The type of inventory (string). This field is available only for inventory sharing/transfer.
    • status: The pool of the inventory (string). This field is available only for inventory sharing/transfer. The values are resource, customer, installed, and deinstalled.
    • inventoryId: The identifier of the inventory shared/transferred (integer). This field is available only for inventory sharing/transfer.
    • quantity: The quantity of non serialized inventory transferred (integer). This field is available only for non serialized inventory transfer from mobility.

The following is the structure of the transaction field in the collaboration events:

  • transaction: A record containing the following transaction related fields:
    • transactionIdb: The identifier of the transaction (integer) that is used to store the transaction in the field collaboration server.
    • author: The user login of the user who started this transaction (string).
    • startTime: The time when this transaction was started (string). The time format is YYYY-MM-DD HH:MM:SS.
    • timeoutTime: The time after which the transaction will be timed out (string). The time format is YYYY-MM-DD HH:MM:SS.
    • lastUpdatedBy: The user login of the user who last updated the transaction (string). The value is SYSTEM when the server makes an update.
    • operationStatus: The latest action that was performed on this transaction (string). The values are accepted, rejected, failed, cancelled, and transferred.
    • toAddress: The address of the user to which this transaction is sent (string). The value is the user who accepted the activity for activity broadcasts. The value is empty if no user accepts the activity in an activity broadcast.
    • status: The status of the transaction (string). The values are started, timed_out, and finished.