pkumar22
(prasantha Kondakagari)
March 10, 2024, 7:03am
1
Hi,
A user has explicitly requested entitlement1 and entitlement2 and needs to send an email notfication. When I try to apply the filter below, it shows a JSON error. Any idea?
$.accountRequests[?(@.source.id ==“9b3f56b45071402cb07274c019cefc02”)] .attributeRequests[?(@.attributeValue == “Entitlement1” || @.attributeValue == “Entitlement2”)]
Hi @pkumar22 ,
Just try using this:
$.accountRequests[?(@.provisioningResult == ‘committed’ && @.provisioningTarget == ‘Source_Name’ && (@.attributeRequests[].attributeValue == ‘Entitlement_ID1’ || @.attributeRequests[ ].attributeValue == ‘Entitlement_ID2’))]
Else,
Use provisioning trigger → $.accountRequests[*].attributeRequests[?(@.attributeValue == ‘Entitlement_ID’ || @.attributeValue == ‘Entitlement_ID2’)]
Use verify data type to check the source in which the provisioning done.
I have not verified this but something like this should work .
Thanks!
1 Like
Please let me know if this worked
pkumar22
(prasantha Kondakagari)
March 11, 2024, 2:49am
4
I tried both, but it did not work.
Shall I know in which step you got the error.
General info:
While using provisioning workflow,
source in which the provision happened will be identified by path “accountRequests[*].provisioningTarget”
attribute value will be identitified by path “accountRequests[* ].attributeRequests[*].attributeValue”
provisioning result can be got through “accountRequests[*].provisioningResult”
dopstrick
(Dylan Strickland)
March 11, 2024, 12:45pm
6
You’re trying to filter on nested lists (with filters at different levels). I’m not sure if you can do that with JSON Path.
What you can do is filter on the provisioningResult && provisioningTarget, then loop through the requests in the next step(s) to check the attributeValue in a compare string step.
1 Like
jesvin90
(Jesvin Joseph)
March 20, 2024, 3:22am
7
Hi @pkumar22 ,
Can you try with a single quote instead of double quote in the filter. The below ones work for me
$.accountRequests[?(@.source.id =='9b3f56b45071402cb07274c019cefc02')].attributeRequests[?(@.attributeValue == 'Entitlement1' || @.attributeValue == 'Entitlement2')]
$.accountRequests[*].attributeRequests[?(@.attributeValue == 'Entitlement1' || @.attributeValue == 'Entitlement2')]
You may also want to try deleting the trigger node and re-creating it again if it still throws the error.
system
(system)
Closed
May 19, 2024, 3:22am
8
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.