We’re building a Studio script to route calls based on customer tier data pulled from a REST proxy call. The JSON response comes back fine, but the downstream IF block always takes the default path, ignoring the condition.
Here’s the snippet:
{
"type": "ASSIGN",
"target": "$.context.customerTier",
"source": "$.restProxy.response.tier"
}
Followed by:
{
"type": "IF",
"condition": "$.context.customerTier == 'Gold'"
}
The debug log shows $.restProxy.response.tier is definitely “Gold”. But when I check the context in the IF block, it’s null. Am I missing a step to persist the value across actions? Or is the ASSIGN action not committing to the context scope immediately?
We’ve tried adding a WAIT action between them, but that just delays the failure. The goal is to keep this simple without looping back to the REST call. What’s the correct way to bridge the REST response into the IF logic?