GetDayOfWeek returns correct number but comparison in expression fails

I’ve been fighting with the Architect expression builder for the last few hours. Trying to flag interactions that happened on a weekend so we can route them differently.

I tried using DateTimeDiff to compare the interaction start time against the current time, but the math gets messy when you cross midnight. Then I found GetDayOfWeek in the docs, which seemed perfect.

Here’s the expression I’m testing in the Data Action:

{{GetDayOfWeek(InteractionStart)}} = 0 || {{GetDayOfWeek(InteractionStart)}} = 6

The documentation says 0 is Sunday and 6 is Saturday. But when I run this in the flow, it never evaluates to true. I checked the raw value of {{GetDayOfWeek(InteractionStart)}} by logging it to a variable, and it returns a number like 4 (which is correct for a Thursday interaction).

So the function works. The comparison fails.

I’ve tried:

  • Casting the result to integer explicitly
  • Using == instead of =
  • Checking if InteractionStart needs to be formatted first

Nothing works. The expression just returns false or null. Is there a specific syntax for comparing the output of these date helper functions? Or am I missing something obvious about how Architect handles the return type?

Environment:

  • Genesys Cloud US1
  • Architect version 2024-10
  • Data Action type: API Call
  • Using standard interaction attributes