Hey folks,
I’m trying to build a simple Studio flow that checks an agent’s current adherence status before routing a call. I’m pulling the data from our internal WFM dashboard endpoint, which returns a JSON payload with a status field. The goal is to branch the flow: if the status is "compliant", route to the normal queue. If it’s anything else, drop to voicemail.
The problem is the IF action keeps evaluating to false even when I hardcode the expected value for testing. I’ve double-checked the spelling and case sensitivity. Here’s the snippet I’m using:
ASSIGN status = GetRESTProxy("wfm_dashboard").response.body.status
IF status == "compliant"
GOTO "Normal Route"
ELSE
GOTO "Voicemail"
END IF
I added a Log action right after the ASSIGN to see what’s actually coming back. The log shows status = compliant (no quotes, just the raw string). But the IF block still sends it to the ELSE path.
I’m wondering if the GetRESTProxy is returning the value as an object or if there’s some hidden whitespace. I tried trimming it with TRIM(status) but that didn’t help. Also, I’m not sure if the == operator works for string comparison in Studio or if I need a different syntax.
Has anyone run into this before? I’m stuck on why the comparison is failing when the log output looks correct.