Skip to main content

Appointments Routing

Interaction Routing

The interaction structure encapsulates routing-specific information along with custom fields. This structure enables explicit setting of a Genesys Widget deployment of choice, accommodating different routing types for customer interactions. Additionally, the chatMode property allows for customization of the chat experience based on specified modes. Below is a snippet of a typical interaction example from a ScheduleAppointment request.

Typical Example (Snippet)

{
"interaction": {
"routing": {
"type": "GENESYS_CLOUD_QUEUE",
"properties": {
"deploymentId": "c1f80eac-18ed-4178-97ca-dc95db267787",
"queueName": "queue1",
"chatMode": "genesys-web-messaging"
}
},
"customFields": {
"cf1": "cf_value1",
"cf2": "cf_value2"
}
}
}

Description and Usage

NameTypeDescription
routingObjectContains interaction routing information.
routing:typeEnumeration - type stringDefines the widget deployment routing type. Supported values are GENESYS_CLOUD_FLOW or GENESYS_CLOUD_QUEUE.
routing:propertiesKey value pairs - type stringProperties set according to routing:type.
routing:properties:chatModeStringOptional. Specifies the chat mode for the interaction, defaulting to genesys-cloud if not set. For more details, see the available chat-mode options in the widget configuration options page.

GENESYS_CLOUD_FLOW

  • Usage: Connects the widget to an inbound chat flow.
  • Documentation: For more information, see Inbound Chat Flows Overview.
  • Note: Not setting a routing:type will default to GENESYS_CLOUD_FLOW.

GENESYS_CLOUD_QUEUE

  • Usage: Connects the widget directly to a specified queue, typically configured as widget type "Version 2".
  • Note: routing:properties must include a "queueName" when using GENESYS_CLOUD_QUEUE.

ChatMode

  • Description: Allows specifying a chat platform or mode, enhancing flexibility for integrations.
  • Default: If not set, defaults to genesys-cloud.
  • Customization: Accepts any string value representing the chat mode, without validation by the appointments service.

Routing Properties

  • GENESYS_CLOUD_FLOW

    • deploymentId: Unique identifier for the widget deployment. Defaults to the application settings configuration if not set.
  • GENESYS_CLOUD_QUEUE

    • deploymentId: Identifies the widget deployment.
    • queueName: Name of the queue for interaction routing.
    • chatMode: Custom chat mode for the interaction (optional).

Custom Fields

Custom fields propagate as custom user data, which can be used for complex flow routing. This data is accessible within Architect as participant data.

  • Note: Prefix references with context. to access custom participant data in Architect.

Example Reference in Architect

{
"customFields": {
"field1": "value1"
}
}
// Accessed in Architect as _context.field1_

Examples

1. Schedule Appointment via Queue with Custom Chat Mode

{
"applicationId": "7f9ac3e8-0046-4bd7-9638-d82ce0e5c5b6",
"title": "Video Appointment Test",
"start": "2022-09-19T16:10:00.000Z",
"duration": "PT5M",
"timezone": "Europe/Athens",
"notes": "Appointment example test...",
"interaction": {
"routing": {
"type": "GENESYS_CLOUD_QUEUE",
"properties": {
"deploymentId": "c1f80eac-18ed-4008-97ca-dc95db267787",
"queueName": "csqDesk",
"chatMode": "genesys-web-messaging"
}
},
"customFields": {
"cf1": "cf_value1",
"cf2": "cf_value2"
}
},
"customer": {
"username": "bDillon_",
"name": {
"firstName": "Bob",
"lastName": "Dillon"
},
"metadata": {
"refNo": "CS-9838"
}
}
}

2. Schedule Appointment via Flow with Default Chat Mode

{
"applicationId": "7f9ac3e8-0046-4bd7-9638-d82ce0e5c5b6",
"title": "Video Appointment Test",
"start": "2022-09-19T16:10:00.000Z",
"duration": "PT5M",
"timezone": "Europe/Athens",
"notes": "Appointment example test...",
"interaction": {
"routing": {
"type": "GENESYS_CLOUD_FLOW",
"properties": {
"deploymentId": "497d1b49-2c97-458a-a6c2-aaccd468b56e"
// chatMode defaults to 'genesys-cloud' if not specified
}
},
"customFields": {
"cf1": "cf_value1",
"cf2": "cf_value2"
}
},
"customer": {
"username": "bDillon_",
"name": {
"firstName": "Bob",
"lastName": "Dillon"
},
"metadata": {
"refNo": "CS-9838"
}
}
}