Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Outbound Call - Triggers, Workflow Data, and Integration

    Posted 9 days ago

    Hello,

    I am currently attempt to solve for a scenario in which a manually placed outbound call must have a piece of participant data set which is sourced from a data integration for a CRM system.  The vendor whose product consumes the participant data has indicated that this should be done via a trigger and workflow.

    Right now I am working through a proof of concept for this design and trying to collect a DNIS within the workflow for use as an input for the necessary data integration.

    I am attempting to use the API endpoint /api/v2/analytics/conversations/${input.conversationId}/details to source the dnis.

    The above works in terms of retrieving the data, but the trouble is that the dnis I need is in a nested array, so I can't flatten it for use in Architect.

    Also I am not entirely certain at the moment as to how to get the conversation ID into the workflow to start with and while I've not spent a lot of time on that part of the question, I am curious if anyone can make a recommendation for an approach in general.  In the end, I just need to get a DNIS into a data action on a manually placed outbound call and then put the output of that data action into participant data.

    Thanks,

    Matt


    #ArchitectureandDesign
    #Integrations

    ------------------------------
    Matt Riedl
    Acliviti, LLC
    ------------------------------


  • 2.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Top 25 Contributor
    Posted 9 days ago

    Depending on the event used, your event trigger response should give you the conversationId.

    If you are using a campaign rule instead, consider using POST /api/v2/analytics/conversations/details/query

    You could set the filter/search in the body to look for the outboundContactId which you will have access to from the contact list, and will give you conversationId and dnis amongst other items.  

    When dealing with nested values, you are going to have to map those out in the translation map.

    So in your example the output contract is just:

    and the response template is:

    Your actual response template may be a little more complicated, to handle defaults, and if you are returning all DNIS, then you may be dealing with an array, or need to get first from array etc. But hopefully this gets you started.



    ------------------------------
    Anton Vroon
    ------------------------------



  • 3.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Posted 8 days ago

    Hi Anton,

    Thanks for this.  I tried this out and am having some difficulty with it.  I am noticing that it isn't returning values when I run it with this translation map, and it also still throws an error if I attempt to flatten it.  I am curious if you might be able to point me toward a reference for the translation map syntax, as I'd like to experiment with this further.

    Thanks,

    Matt



    ------------------------------
    Matt Riedl
    Acliviti, LLC
    ------------------------------



  • 4.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Top 25 Contributor
    Posted 8 days ago

    So copy the example I gave, exactly. So your output contract doesn't have any nested arrays, but you use the translation map to fetch those specific details from the nested array that you require.

    Your output contract doesn't have to match the actual output, that is what the translation map is therefore, to translate the actual output to the outputs you want to use in architect. 



    ------------------------------
    Anton Vroon
    ------------------------------



  • 5.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Posted 6 days ago

    Hi Anton,

    I've looked through it a few times and thought I had it exact.  Here's my text for comparison to the screen capture you shared if you can spot anything my eyes are missing:

    {
      "translationMap": {
        "DNIS": "$.participants[0].sessions[0].dnis"
      },
      "translationMapDefaults": {},
      "successTemplate": "{\n\"DNIS\" : ${DNIS} \n}"
    }

    Note:  I tried it with and without the blank line in row 4 and got the same result for both when testing.

    I was hoping there was some sort of syntax reference I could go to for the translation map to try to troubleshoot.  I did go through the video you shared earlier to try to get my bearings and I also found it helpful, but also noticed that the presenter copied and pasted some content from a notepad which I wasn't sure where he was sourcing the content from, and struggled with it a bit.  I may have just missed some details and could review it again, but I didn't see coverage of this process specifically.

    Thanks,

    Matt



    ------------------------------
    Matt Riedl
    Acliviti, LLC
    ------------------------------



  • 6.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Posted 9 days ago

    Hi

    Which trigger topic are you planning to use? If you see dnis in the schema, you can just pass that to your workflow along with conversation id.



    ------------------------------
    Cheers
    Zubair
    ------------------------------



  • 7.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Posted 8 days ago

    Thanks Muhammad,

    This seems like a better approach than what I was trying before.  I've not done this before, but I've got a couple test configurations I am experimenting with at present using these two topics, both of which appear to contain DNIS.

    v2.detail.events.conversation.{id}.user.start

    v2.detail.events.conversation.{id}.acd.start

    What I am struggling with at the moment is figuring out how to consume a variable from the trigger topic into the workflow as an input variable. I am curious if you would be willing to point me in the right direction for that.

    Thanks,

    Matt



    ------------------------------
    Matt Riedl
    Acliviti, LLC
    ------------------------------



  • 8.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Top 25 Contributor
    Posted 7 days ago

    If you are going down the event path, I would recommend you take a watch the DevDrop video on this

    https://www.youtube.com/watch?v=PHv5Tb5L42k&t=2s

    The overview page on dev center touches on this lightly, but the above video really helped me

    https://developer.genesys.cloud/platform/process-automation/



    ------------------------------
    Anton Vroon
    ------------------------------



  • 9.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Posted 7 days ago

    Hi Matt

    Ofcourse, here is what you need to do.  

    1. Configure your Trigger with Data Format set to TopLevelPrimitives.

    2. In your Workflow create following two string variables with Input to Flow ticked

    conversationId
    dnis

    So when trigger will execute workflow, the variables will populate automatically. 



    ------------------------------
    Cheers
    Zubair
    ------------------------------



  • 10.  RE: Outbound Call - Triggers, Workflow Data, and Integration

    Posted 6 days ago

    Thanks Muhammad,

    This was very helpful and filled in the blanks I needed to to get a functional proof of concept build put together using this method.  I think this will be my solution for my project.

    Thanks,

    Matt



    ------------------------------
    Matt Riedl
    Acliviti, LLC
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources