Hi VJ,
I think the issue stems from your dates not being in ISO8601 format - if you use $.now() in your define variable, you will see that the suffix should be T00:00:00.000Z
Try the below
{
"name": "Test for Date Due in 5 days",
"description": "",
"definition": {
"start": "Define Variable",
"steps": {
"Compare Timestamps": {
"actionId": "sp:compare-timestamps",
"choiceList": [
{
"comparator": "TimestampLessThanEqualsXDayFuture",
"nextStep": "End Step - Success",
"variableA.$": "$.defineVariable.certDeadLine",
"variableB": "1"
}
],
"defaultStep": "End Step - Failure",
"displayName": "",
"type": "choice"
},
"Define Variable": {
"actionId": "sp:define-variable",
"attributes": {
"id": "sp:define-variable",
"variables": [
{
"description": "",
"name": "currentdate",
"transforms": [
{
"id": "sp:transform:replace:string",
"input": {
"pattern": "T.*",
"replacement": "T00:00:00.000Z"
}
}
],
"variableA.$": "$.now()"
},
{
"description": "",
"name": "CertDeadLine",
"transforms": [
{
"id": "sp:transform:replace:string",
"input": {
"pattern": "T.*",
"replacement": "T00:00:00.000Z"
}
}
],
"variableA.$": "$.trigger.campaign.deadline"
},
{
"description": "",
"name": "now",
"transforms": [],
"variableA.$": "$.now()"
}
]
},
"displayName": "Current date - Define Variable",
"nextStep": "Compare Timestamps",
"type": "Mutation"
},
"End Step - Failure": {
"actionId": "sp:operator-failure",
"displayName": "",
"failureName": "Comparison failed",
"type": "failure"
},
"End Step - Success": {
"actionId": "sp:operator-success",
"displayName": "",
"type": "success"
}
}
},
"enabled": false,
"executionCount": 0,
"failureCount": 0,
"trigger": {
"type": "EVENT",
"attributes": {
"id": "idn:campaign-activated"
}
}
}