Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Triggers - The condition to check whether a specific Division ID exists in conversation is not working

    Posted yesterday

    I am trying to add "divisionid" as filter condition for an existing Trigger, to reduce number of workflow executions. 

    Topic used: v2.detail.events.conversation.{id}.customer.end

    In our environment, the conversations can have either one or two divisions associated with it. In the trigger condition, I want to check if the conversation contains a specific division id for executing the workflow.

    The condition used: JsonPath - divisionIds [as per event schema], operator - contains, value - "xxxx-xxxx-xxxx-xxxxxxxxxxxx"

    Below trigger is not working after adding the fifth condition. Is there any solution for this?


    #Triggers

    ------------------------------
    Subhajit Podder
    NA
    ------------------------------


  • 2.  RE: Triggers - The condition to check whether a specific Division ID exists in conversation is not working

    Posted yesterday
    Edited by Phaneendra Avatapalli yesterday

    Hi Subhajit,

    From my understanding, while divisionIds may appear in the event schema, it doesn’t seem to be consistently populated in the actual trigger payload for this event (v2.detail.events.conversation.{id}.customer.end).

    In practice, only a single divisionId is typically available, so a condition like divisionIds contains ... may not evaluate as expected.

    You could try using divisionId directly (e.g. divisionId equals ...) if that fits your use case. However, this would only match the single division provided in the event.

    If you need to handle scenarios where conversations involve multiple divisions, you may need to move that logic into the workflow instead.

    Hope this helps, someone from community might add more to this.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 3.  RE: Triggers - The condition to check whether a specific Division ID exists in conversation is not working

    Posted yesterday

    Just to add to this I have used divisionIds contains ... successfully in sentiment-based triggers, where the array is populated.

    However, for this event, it looks like divisionIds isn't consistently populated in the trigger payload, and only a single divisionId is available. That might explain why the same approach isn't working here.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 4.  RE: Triggers - The condition to check whether a specific Division ID exists in conversation is not working

    Posted 7 hours ago

    Hi Subhajit,

    To add to everything Phaneendra has already said above:

    • I would suggest that you test what exactly this event is populating on the divisionId field for the scenario that you need to work on.

    • For that you can just remove that condition for now, and create a "divisionId" input variable on your workflow.. Then you set that as a participant data or just check the Flow History to see what was the value of the variable.

    • This way you can make sure that the event actually has the divisionId value that you are expecting. If it does, then the condition on the trigger should work.. But as Phaneendra said it's more likely that it just doesn't have the division that you are expecting there in the event.

    • If you get to the conclusion that it doesn't have the division that you are expecting, you can filter it on the call flow, as mentioned by Phaneendra. Just have a Data Action checking for all divisions included on your conversationId, and then you can check if the required division is there among those... If it is, move forward with the Workflow, and if it isn't, you just end the workflow at that point.


    ------------------------------
    Marcello Jabur
    ------------------------------