Legacy Dev Forum Posts

 View Only

Sign Up

Trigger on user.{id}.activity retrieve data on Wrokflow

  • 1.  Trigger on user.{id}.activity retrieve data on Wrokflow

    Posted 06-05-2025 19:05

    MFRYS | 2023-11-30 07:16:39 UTC | #1

    Hi everyone,

    i'm trying to set a Workflow on a trigger topic : user.{id}.activity. It's working fine, the workflow is launched correctly.

    But i would need some info from the Event that have triggered, but i'm not able to get it on the flow ! How can i get the userId, the status and other info from the event ?

    Here the Json event :

    {

    "id": "095894df-3d33-49f4-9377-db9b274baddb", "routingStatus": { "status": "OFF_QUEUE", "startTime": "2023-11-29T17:29:06.851Z" }, "presence": { "presenceDefinition": { "id": "6a3af858-942f-489d-9700-5f9bcdcdae9b", "systemPresence": "AVAILABLE" }, "presenceMessage": "", "modifiedDate": "2023-11-30T07:02:25.614Z" }, "outOfOffice": { "active": false, "modifiedDate": "2023-10-25T10:34:18.686Z" }, "activeQueueIds": [ "8c148202-950f-4bb7-9d59-ab4dd9076c93", "0f707d40-cafd-48fa-8c04-a17318a42c4c" ], "dateActiveQueuesChanged": "2023-11-29T17:30:55.546Z" }

    Thanks for your help.


    Jason_Mathison | 2023-12-05 16:28:02 UTC | #2

    I created an example for the user activity topic: https://developer.genesys.cloud/platform/process-automation/trigger-examples/user-in-away-status

    The key part is that you are going to want to use a dataFormat of type Json so that you will have access to the entire JSON object in your flow as the jsonData input parameter.

    --Jason


    MFRYS | 2023-12-12 08:12:18 UTC | #3

    Hi Jason,

    Thank you for your answer. But i have done some test and jsonData is empty ... do i miss something ? I have created a JSON input data on the flow. If i try to manipulate with JSon function it crash, and if i print it, it is empty...

    Any advise ?

    Thanks


    MFRYS | 2023-12-12 08:29:45 UTC | #4

    Ok, i found the issue, i have edited the trigger through API to set DataFormat to Json, it is not set by default, now it works.


    system | 2024-01-11 08:29:58 UTC | #5

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 23427