Dynamics365
#tech-nugget – D365CC –  Context Variables and Route to Queue

#tech-nugget – D365CC – Context Variables and Route to Queue

I thought I would start these #tech-nuggets for quick fixes and niggles I’m coming over some of the vendors I’m using, hope some of them help!

Copilot Studio bots are really fun to work with, everyday we have new options and changes coming in for us to play with, back when it was pushed for D365CC it has limited variable types, but a new one has been enforced, a Choice type.

I had been racking my brain on this as I wanted to use Route to Queue with an Entity passed back to capture a pre-defined Queue route, manual still, as not everything needs to be Unified Routing (keeping it simple).

I had found that when it was escalated back to the Workstream that it wasn’t picking up my variable type as a context variable, as as we see it only accepts a Text or Number type, for some reason Choice had something in there but this didn’t like it – quick hint – I tested this with just using a condition to pick up if ‘something’ was in there under the Context item value.

The way around this is that I converted the type in the copilot flow to text before sending it back using a PowerFX Formula (these are fun):

Don’t forget to set this as a Global with External sources can set values checkbox.

I had found one comment randomly in a simular situation and applied the logic, as this is all new I hope it gives a starting point if you come over it, or it natively works with the Choice variable Copilot Studio sets for us! –

Who know’s by the time this reaches anyone, it will all just work anyway!