Using Attribute Trigger

Hello All,

I am trying to work with v2.detail.events.conversation.{id}.attributes. My intent is to trigger when a certain attribute is set in a flow and then route to a workflow to activate a data action. I am not sure what I am doing wrong for it to match. Thanks.

My trigger:

{
"id": "xxxxxx",
"name": "setRetention",
"topicName": "v2.detail.events.conversation.{id}.attributes",
"target": {
"type": "Workflow",
"id": "xxxxxxxxx"
},
"version": 1,
"enabled": true,
"matchCriteria": [
{
"jsonPath": "attributes",
"operator": "Equal",
"value": "setRetention"
}
],
"eventTTLSeconds": 60

My test results:

Body I used for testing:

{
"eventTime": 0,
"conversationId": "123",
"participantId": "123",
"attributes": {
"setRetention": "setRetention"
}
}

... and results

{
"schemaValidation": {
"name": "Validate test event body against topic schema",
"step": 1,
"matches": true
},
"targetValidation": {
"name": "Verify trigger target is configured correctly",
"step": 2,
"matches": true
},
"jsonPathValidation": {
"name": "Check jsonPath match criteria",
"step": 3,
"matches": false,
"details": [
{
"jsonPath": "attributes",
"operator": "Equal",
"value": "setRetention",
"generatedJsonPathCondition": "attributes",
"match": false,
"jsonPathExtraction": [
{
"value": {
"setRetention": "setRetention"
},
"path": "$['attributes']"
}
]
}
]
},
"triggerMatches": false
}

hi Matt
Try following match criteria

  "matchCriteria": [
    {
      "jsonPath": "attributes['setRetention']",
      "operator": "Equal",
      "value": "True"
    }
  ]

Hi Zubair,

Thanks for your guidance. I was able to get it to work using the following:

"matchCriteria": [
{
"jsonPath": "$['attributes']['setRetention']",
"operator": "Exists",
"value": true
}

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