I would like to set up a workflow that’s triggered when LCS changes from "inactive" or "delete" to "active" and I was hoping to use this relatively new trigger “Identity Lifecycle State Changed”. But I am not able to figure out the filter to be applied to limit the execution to the condition described above.
JSON Input from the trigger is in the format
{
"identity": {
"id": "ee769173319b41d19ccec6cea52f237b",
"name": "john.doe",
"type": "IDENTITY"
},
"oldLifecycleState": "preHire",
"newLifecycleState": "active"
}
What have you tried & What errors did you face (share screenshots)?
vkashat
(Vincent Kashat)
August 5, 2025, 7:59pm
2
Does it behave different if you use double quotes instead of single quotes?
vkashat
(Vincent Kashat)
August 5, 2025, 8:08pm
3
If that doesn’t make a difference, I might still try to use the Identity Attribute Changed trigger, I’ve had success using something like this:
$.changes[?(@.attribute == "cloudLifecycleState" && @.newValue == "terminated") && ($.oldValue == "inactive" || $.oldValue == "delete")]
check this
"filter.$": "$.changes[?(@.attribute == \"cloudLifecycleState\" && @.newValue == \"active\" && @.oldValue in [\"terminated\", \"inactive\"])]",
iamnithesh
(Nithesh Rao)
August 5, 2025, 10:44pm
5
$.changes[?(@.attribute == "cloudLifecycleState"
is for Identity Attributes Changed trigger
try this
$[?(@.newLifecycleState == 'terminated' && (@.oldLifecycleState == 'inactive' || @.oldLifecycleState == 'delete'))]
iamnithesh
(Nithesh Rao)
August 6, 2025, 12:51am
7
Thanks @kalyan_dev32
I cannot utilize [?(@. )] format as the input json is not an array.
Yes, the input is not an array. However, I’ve verified it with the event trigger filter, and it’s working as expected. Refer below screenshot.
2 Likes
iamnithesh
(Nithesh Rao)
August 6, 2025, 12:28pm
9
Thanks @kalyan_dev32
I am assuming there is a $. in the beginning of your filter string. It still does not work
Also, I am seeing this error in the workflow
I believe you should use this filter
$[?(@.newLifecycleState == 'terminated' && (@.oldLifecycleState == 'inactive' || @.oldLifecycleState == 'delete'))]
Filter you can use.
$.changes[?(@.attribute == 'cloudLifecycleState' && @.oldValue == 'active' && (@.newValue == 'termPending' || (@.newValue == 'inactive'))]
ipobeidi
(Ivan Obeidi)
August 6, 2025, 1:06pm
12
Just use the identity one. Thats is what i would do.
1 Like
UjjwalJain
(Ujjwal Jain)
August 6, 2025, 7:05pm
14
@iamnithesh , Give this a shot, I recently worked on something similar.
$.[?( (@.newLifecycleState == ‘terminated’) && (@.oldLifecycleState == ‘prehire’ || @.oldLifecycleState == ‘active’) )]
udayputta
(UDAY PUTTA)
August 6, 2025, 8:05pm
15
@iamnithesh you can validate/generate the filter using this endpoint.
Even though it says to test subscription filter I usually use this to generate the filter that can be used in workflow trigger.
For your input if I use the below filter it says as valid
"filter": "$.[?((@.newLifecycleState == \"active\") && (@.oldLifecycleState == \"inactive\" || @.oldLifecycleState == \"delete\"))]"
You can also play around by passing different values and see if the filter is working as expected or in your postman itself.
1 Like
system
(system)
Closed
October 5, 2025, 8:05pm
16
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.