Legacy Dev Forum Posts

 View Only

Sign Up

Wrap Up Code Back End integration

  • 1.  Wrap Up Code Back End integration

    Posted 06-05-2025 18:47

    Filipe_Madelino | 2017-04-07 09:46:22 UTC | #1

    Hi,

    Currently on our organization there is a project in place rolling out PureCloud...

    The first deliver will be around OutBound calls...

    A bit of our usage scenario:

    1. Back-end system generating the call list which after is loaded into PureCloud.

    On the call list we have also an ID for the contact so that we can correlate with our internal systems

    1. During the OutBound/Queue flow there is an action that will thru a connector (Bridge Server) load the customer data from our back-end systems
    2. When the screen (Script) is present to the agent it will show all the data relevant for the campaign to interact with the contact/customer

    4)After disconnecting the Wrap up code popup and the agent selects and completes the process...

    Our current challenge is on step 4, meaning how to propagate the Wrap Up code to our back-end systems? As after disconnecting we are not anymore on the context of the flow and can't make use of any action to propagate the info thru an action (Bridge Server)... Is the subscription of topics our only option? If that is the case which topic and will the payload associated with the topic contain our internal client ID so that we could after correlate to our back-end systems.

    Thanks

    Regards Filipe Madelino


    tim.smith | 2017-04-10 15:22:24 UTC | #2

    Filipe_Madelino, post:1, topic:1157
    After disconnecting the Wrap up code popup and the agent selects and completes the process...

    When the agent completes the process, invoke a custom action that executes multiple actions (set wrap up, call bridge action to send wrap up to your server, and anything else you need to do). See an example of this here:

    https://developer.mypurecloud.com/forum/t/how-can-i-continue-with-the-flow-after-submit-call-bridge-action-in-screen-pop/1114/2?u=tim.smith


    Filipe_Madelino | 2017-04-10 21:38:31 UTC | #3

    Hi Tim,

    Thanks for your feedback.

    I understand the capability to use action from build script pages that we can control... the issue I'm raising is when the agent ends the call and out of the box wrap up pop is present to the agent, on which we don't have control... or are you saying that we can control the wrap up pop page that appears to agent as soon the call is disconnected?

    Thanks

    Regards Filipe Madelino


    tim.smith | 2017-04-10 22:50:42 UTC | #4

    I apologize, I was under the impression that wrap up codes could be set from a script, but I was mistaken. You have a few options:

    1. Have the user enter the wrap up value in the script and submit it to your service via a bridge action. They will still have to use the standard wrap up interface to assign a wrap up code to the conversation.
    2. Subscribe to the user's conversation events and inspect the agent's segment for the presence of a wrap up code to know when one has been set.
    3. As a batch process run on some interval, use analytics queries to retrieve conversation details and inspect the conversations for wrap up codes.
    4. Consume PureCloud data as a service and make an API request to get the conversation details on demand when you need data about that conversation.

    Filipe_Madelino | 2017-04-11 22:07:24 UTC | #5

    Hi Tim,

    Thanks for the info...

    So think on the options, can you help me explore the second one: "Subscribe to the user's conversation events and inspect the agent's segment for the presence of a wrap up code to know when one has been set."

    As per my understanding this will be user scope event... or not?

    So if we consider I have a central server how can I subscribe the topic so that I will receive all the wrap up conversation events for all the agents?

    If not possible to go with that solution... only based on the agent scope is available, meaning the agent that is logged in and receiving the event notification... how I will capture that event on the agent side (browser) so that I can run an action?

    Thanks

    Regards Filipe Madelino


    tim.smith | 2017-04-11 22:23:13 UTC | #6

    Notification topics are documented here. Depending on exactly what you want to do, you might use v2.routing.queues.{id}.conversations to get events for conversations in a queue or v2.users.{id}.conversations to get events for a user's conversations. You can get the list of users (to get their IDs) from GET /api/v2/users and queues from GET /api/v2/routing/queues.


    Filipe_Madelino | 2017-04-21 10:27:36 UTC | #7

    Hi Tim,

    Thanks for the feedback....

    I have being this last weeks a bit off... catching up again ;-)

    I think what you are saying is that if I need to capture any event under the conversation I will (depending on the scope) to go into the queue or user... there is no other way?

    Based on the notification topics on documented on here is not clear which event comes from the agent/user pressing done after selecting the Wrap Up Code? Is this thru an indirect approach, meaning subscribing v2.routing.queues.{id}.conversations.calls and after validating the state and capture the wrap up code after? If that is the case what is the state (or other field value) that will clarify represents the agent action Done on the wrap up screen pop up?

    Thanks

    Regards Filipe Madelino


    tim.smith | 2017-04-21 14:01:59 UTC | #8

    I think what you are saying is that if I need to capture any event under the conversation I will (depending on the scope) to go into the queue or user... there is no other way?

    Correct. Conversation event topics are either per user or per queue.

    which event comes from the agent/user pressing done after selecting the Wrap Up Code?

    The notification topics aren't specific actions in a conversation. You will receive the conversation event (as per the schema documentation for the topic) for any change to the conversation. If you are attempting to identify if a specific event has occurred, you will need to compare the parts of the old and new conversation objects and see if there's a difference. For your example, you would find the agent participant in the old and new objects and compare if there's a difference in the wrap up code property to see if one has been set. This method should be applied to detect any change you're looking for.


    system | 2017-08-28 19:33:41 UTC | #9


    This post was migrated from the old Developer Forum.

    ref: 1157