# Conditional Transform Expression

**URL:** <https://developer.sailpoint.com/discuss/t/conditional-transform-expression/102310>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, sailpoint-identity-security\
**Created:** [February 26, 2025, 2:14pm UTC](https://developer.sailpoint.com/discuss/t/conditional-transform-expression/102310 "2025-02-26T14:14:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vittoria](https://avatars.discourse-cdn.com/v4/letter/v/8e7dd6/32.png) [@Vittoria](https://developer.sailpoint.com/discuss/u/Vittoria)\
**Post date:** [February 26, 2025, 2:15pm UTC](https://developer.sailpoint.com/discuss/t/conditional-transform-expression/102310/1 "2025-02-26T14:15:00Z")

</div>

Hello,  
I need to implement a transform to determine the license of accounts based on their lifecycle state. I used a conditional transform, but I’m having trouble with the expression. I don’t know why the OR operator doesn’t seem to be recognized from the system. Any tips?  
{  
“name”: “License\_Status”,  
“type”: “conditional”,  
“attributes”: {  
“expression”: “$lifecycleState eq terminated || $lifecycleState eq inactive”,  
“positiveCondition”: “unlicensed”,  
“negativeCondition”: “$licenseStatus”,  
“lifecycleState”: {  
“attributes”: {  
“name”: “cloudLifecycleState”  
},  
“type”: “identityAttribute”  
},  
“licenseStatus”: {  
“type”: “static”,  
“attributes”: {  
“value”: “#if($identity.getLinks().size()\<=3)light#{else}licensed#end”  
}  
}  
},  
“internal”: false  
}

---

<div class="post-metadata">

**Author:** ![sup3rmark](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sup3rmark/32/36229_2.png) [@sup3rmark](https://developer.sailpoint.com/discuss/u/sup3rmark)\
**Post date:** [February 26, 2025, 2:21pm UTC](https://developer.sailpoint.com/discuss/t/conditional-transform-expression/102310/2 "2025-02-26T14:21:09Z")

</div>

Hi @Vittoria!

Please put triple-ticks around your code blocks so they’re properly formatted; this is hard to read in its current format.

```json
{
    "name": "License_Status",
    "type": "conditional",
    "attributes": {
        "expression": "$lifecycleState eq terminated || $lifecycleState eq inactive",
        "positiveCondition": "unlicensed",
        "negativeCondition": "$licenseStatus",
        "lifecycleState": {
            "attributes": {
                "name": "cloudLifecycleState"
            },
            "type": "identityAttribute"
        },
        "licenseStatus": {
            "type": "static",
            "attributes": {
                "value": "#if($identity.getLinks().size()<=3)light#{else}licensed#end"
            }
        }
    },
    "internal": false
}

```

the conditional transform does not appear to support the `or` operator. per the [documentation](https://developer.sailpoint.com/docs/extensibility/transforms/operations/conditional), `the eq operator is the only valid comparison`.

the better way to handle this would be a [static transform](https://developer.sailpoint.com/docs/extensibility/transforms/operations/static) where the comparison is all made with Velocity, like you’re doing with your `licenseStatus` variable.

---

<div class="post-metadata">

**Author:** ![suresh4iam](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/suresh4iam/32/29513_2.png) [@suresh4iam](https://developer.sailpoint.com/discuss/u/suresh4iam)\
**Post date:** [February 26, 2025, 11:13pm UTC](https://developer.sailpoint.com/discuss/t/conditional-transform-expression/102310/3 "2025-02-26T23:13:14Z")

</div>

Try this,

```auto
{
    "name": "License_Status",
    "type": "static",
    "attributes": {
        "lifecycleState": {
            "attributes": {
                "name": "cloudLifecycleState"
            },
            "type": "identityAttribute"
        },
        "licenseStatus": {
            "type": "static",
            "attributes": {
                "value": "#if($identity.getLinks().size()<=3)light#{else}licensed#end"
            }
        },
        "value": "#if(($lifecycleState == 'terminated' || $lifecycleState == 'inactive')unlicensed#{else}$licenseStatus#end"
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [April 27, 2025, 11:13pm UTC](https://developer.sailpoint.com/discuss/t/conditional-transform-expression/102310/4 "2025-04-27T23:13:54Z")

</div>

Closed on April 27, 2025, 11:13pm UTC

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