🪝Before Queue-Up

Run custom code before queuing a case.

Overview

The webhook is triggered when qucase'sup for a walk-in servicase'sore the case is creacase'sd added to the queue.

You case'se this webhook to perform the following tasks:

  • Modify the case fields and tags.

  • Set the case’s customer.

  • Change the case’s status.

  • Change the case’s service type.

  • Change the case’s channel.

  • Cancel the operation.

API

URL

[base-url]/service/actcase'seforeQueueUp

Request Body

The webhook receives the following input:

  • caseId: The case ID to be created.

  • parentCaseId: The parent case ID (when applicable).

  • referenceDate: The case’s reference date.

  • unitId: The ID of the service's parent unit.

  • serviceId: The service used to create the case.

  • serviceCategoryId: Service category ID.

  • serviceTypeId: Service type ID.

  • status: The case's target status (Pending/Waiting).

  • channel: Communication channel (Face-to-face, Video, etc.).

  • language: The preferred communication language.

  • ticket: The ticket number

    • prefix

    • number

    • suffix

  • fields: A Dictionary of fieldTypeId + fieldValue pairs.

  • tagIds: An array of tag IDs (for future use).

  • customerRecordId: The ID of the customer record linked to the case.

  • useCustomerContactInfo (bool): Indicates whether the linked customer record's contact information (phone number and email) is used as this case's contact information.

  • contactPhoneNumber: The case's contact phone number.

  • contactEmail: The case's contact email.

  • triggeredByUserId: The ID of the user who triggered this action (when applicable). The value is null when a Kiosk or the S2S API triggers the operation.

  • triggeredByUserEmail: The email of the user who triggered this action (when applicable).

Response Body

The webhook returns the following data:

  • status (optional): Updates the case status. Supported values are Pending and waiting. Return null to keep the original status.

  • fields (optional): A Dictionary of fieldTypeId + fieldValue pairs. Allows setting the case field. Return null to keep current field values. Important! The list of fields returned from the webhook replaces the existing case fields. Make sure to return all the fields you want to keep in the case record. Return null to keep the original fields. The webhook can set any of the case's service category fields, the contact email and contact phone number.

  • tagIds: An array of tag IDs. The parameter must include only tags defined within the associated service category. Return null to keep the original tags.

  • removeCustomer (boolean): when True, the case's customer is removed (if applicable).

  • customerRecordId (GUID, optional): The ID of the customer record to link to the case. Leave null to use the original customer record.

  • useCustomerContactInfo (bool): Indicates whether to use the customer's contact information for this case. 🆕

  • contactPhoneNumber: The contact phone number for this case record. Leave null to keep the current phone number (must be null when the useCustomerContactInfo parameter is true). 🆕

  • contactEmail: The contact email for this case record. Leave null to keep the current email (must be null when the useCustomerContactInfo parameter is true). 🆕

  • assignToUserId (GUID, optional): The ID of a user assigned to the case. The user must be a member of the organization.

  • serviceTypeId (optional): Sets the case's service type. The service type must belong the case's service category. Return null to keep the original value.

  • channel (optional): Sets the case's channel. The case's service type must support the channel. Return null to keep the original value.

  • cancelled (boolean): return true to cancel the operation.

  • cancellationReason (text): The cancellation reason. The text will be displayed on the Create Case dialog.

You can use this webhook to set the case's contact phone number and contact email by returning the corresponding fields in the fields array.

Last updated