Provisioning Completed - Event Trigger Filters

Hi Team,

I am using the Provisioning Completed Event Trigger to call some API using HTTP. I would like to add filters to the trigger to call this event only if the source is a specific source and also if the provisioning has failed with errors. Can we add two filters using AND operator.

Example as below: $[?($.sources== “Sandbox-Okta”)] AND $.errors != null

When I add above filter, I am not able to save the event trigger as it is showing the error on filter as illegal value for field filter.

Thanks,
Archana

Hi @sgeddam003,

Event trigger filters use Goessner JSONpath expressions. You can read our documentation on filtering event triggers to get more information on how to use JSONpath. It’s not clearly documented in our docs, but logical operators are supported in JSONpath as && (AND) and || (OR). I’m going to update our docs to make this clear. The following query should work for you:

$[?($.sources == "Sandbox-Okta" && $.errors != null)]

FYI, you can use an online JSONpath evaluator to help develop your expression. I find this tool provides the most accurate results.

Docs have been updated to include examples of using && and ||. Check them out here.

Thank you so much !! This helped. && and || are working for me. I was using AND and OR before like we use them in search. This documentation helps!

1 Like

Hi team,
I just encountered one problem with same issue which is mention above. Below is the full explanation on the use case.

Requirement: When the new user is onboarded from truth source the “Role Base Access Control” membership criteria is stiffing then role will be assigned to that user and ticket will be generated in third party application service desk plus.

we have configured Provisioning Completed Event Trigger with suitable filters to generate ticket in third party application. The required/expected output is to trigger only one ticket with create operation but with our configurations we found that there are 3 duplicate tickets are generating.

Requesting your support on the same.

Filter is :1) $.accountRequests[0].source[?(@.name contains “Source.name”)]

Thank You

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