Edit

Use representative availability APIs in a Copilot Studio agent

You can trigger the representative availability APIs from your Copilot Studio agent to retrieve customer service representative and queue availability information before escalating the conversation to a service representative. By determining availability before escalating, you improve the customer experience and reduce queue abandonment.

Prerequisites

Make sure that the Copilot Studio agent has the Omnichannel administrator role to call the availability APIs.

Add the APIs to Escalate topic

Do the following steps in Copilot Studio:

  1. Go to your AI agent and then select Topics.
  2. Select the System tab to view the default system topics and then select the Escalate.
  3. In the authoring canvas, select Add and then select Add a tool
  4. In the Connector tab, search and select Perform an unbound action in selected environment.
  5. If there are no active connections, do the following steps:
    • Select Create new connection.
    • Select the authentication type as OAuth.
    • Select Create.
  6. Set the Environment to Current.
  7. Select one of the following APIs:
    • CCaaS_GetRepresentativeAvailabilityForConversation
    • CCaaS_GetRepresentativeAvailabilityBeforeConversation
  8. After selecting the action, update the Advanced Parameters as required.
  9. Add the rules for the AI agent based on the API response. you can use the Outputs from this node to create conditional branching logic. For example, if the API returns that no service representatives are available, you can redirect the user to a "Leave a Message" topic instead of escalating the conversation.
  10. Save and publish.

Use representative availability APIs
CCaaS_GetRepresentativeAvailabilityForConversation
CCaaS_GetRepresentativeAvailabilityBeforeConversation