Ok strap in, because this needs absolutely ZERO code.
My sample is a service catalog and I’m looking for a requested_for of Abel Tutor.
If that’s true I’m sending approval to Abel’s manager, otherwise I’m sending to a fixed team.
How do we evaluate if the thing is for Abel Tutor? In this case we dot walk to the Triggering Record’s Requested For.
Since we want to look for a specific user, we paste that user’s sys_id into the value. No single quotes, this isn’t a javascript string. Also, be a good steward of your flow and make sure you annotate who the specific user is, because interpreting and looking up sys_id’s makes puppies sad.
Ok, so if that IF statement evaluates as true lets send to Abel Tutor’s manager. Since the manager may change at any time OR we might change our mind about targeting a specific user, lets make this a rule based, rather than picking another specific approver. In the case of my RITM example, I’m grabbing the Trigger, RITM, Requested_For, Manager.
So now lets deal with the Else case. I don’t know what you meant by XYZ, so I assumed a specific group.
So I used the group silhouette icon to select App Engine Admins
Tested with Abel Tutor, and it successfully went down the true path.