Transfer the Chat to a Specific Oracle B2C Service Queue

Oracle B2C Service uses chat rules and queues to sort incoming chat requests based on Chat Customer Information and Incident custom field values.

By default, the skill routes all agent chats to the default queue. However, you can take advantage of the System.AgentInitiation component's customProperties property to pass in the values for a specific rule that will filter the chat request to the desired queue.

An administrator can set up a Oracle B2C Service queue, profile, and chat rules to route a skill's chat request to the appropriate agents. For example, the Oracle B2C Service interface might have a chat rule that if the fromBot custom field is set to Yes, then add the chat request to the Bot queue. When its rule base doesn't have a rule for an incoming chat, then it sends the chat request to a default queue. (You can learn more about rules at Business Rules in Using Oracle B2C Service.)

Before you begin, you'll need the names and valid values of the custom fields or customer information (or both) that have been defined for the queue's chat rule. If you have admin access to the Oracle B2C Service desktop Service Console, then you can see the chat rules from the Configuration > Site Configuration > Rules > Chat page. Otherwise, ask your Oracle B2C Service administrator to provide this information.

You'll also need to understand how to structure the map object that you use with the customProperties property. See Pass Customer Information to a Live Chat.

  1. If you haven't already, in the context node, define a map variable to use with the System.AgentInitiation component's customProperties property. For example:

    context:
      variables:
        greeting: "string"
        name: "string"
        liveChatInfo: "map"
    
  2. Define the fields for the map variable.

    Here's an example of the standard format for agent-integration channels that were created in version 20.01 or later and that connect to Oracle B2C Service version 19A or later.

      setLiveChatInfo:
        component: "System.SetVariable"
        properties:
          variable: "liveChatInfo"
          value:
            customFields: 
              - name: "c$frombot"
                type: "BOOLEAN"
                value: 1
        transitions:
          next: "agentInitiation"

    Here's an example of the legacy format for agent-integration channels that were created prior to version 20.01 or that connect to a version that is earlier than Oracle B2C Service version 19A.

      setLiveChatInfo:
        component: "System.SetVariable"
        properties:
          variable: "liveChatInfo"
          value:
            customFields: 
              - name: "c$frombot"
                dataType: "BOOLEAN"
                dataValue:
                  booleanValue: true
        transitions:
          next: "agentInitiation"
  3. Add the customProperties property to the System.AgentInitiation component, and set it to the value of your map variable. For example:

      agentInitiation:
        component: "System.AgentInitiation"
        properties:
          agentChannel: "B2CServiceIntegration"
          nlpResultVariable: "iResult"
          customProperties: "${liveChatInfo.value}"
          waitingMessage: "Waiting for an agent..."
          rejectedMessage: "Agents are not available right now."
          resumedMessage: "We're connecting you to an agent..."
          errorMessage: "Oops! We're having system issues. We're sorry, but we can't connect you with an agent right now."
        transitions:
          actions:
            accepted: "agentConversation"
            rejected: "tryAgain"
            error: "tryAgain"
      tryAgain:
        component: "System.Output"
        properties:
          text: "Please try again later."
        transitions:
          return: "tryAgain"