Hi, folks --
I'm working with Functions + TaskRouter, and I can successfully get it to <Enqueue>to my expected workflowSid; however, I haven't found a way to include an underlying <Task> node to route to a particular worker. Here are a few things I've tried:
//var enqueueNode = twiml.enqueue({ workflowSid:"mysid" }, JSON.stringify(taskData));
var enqueueNode = twiml.enqueue({ workflowSid:"mysid" }); // works but no <Task> node
//var enqueueNode = twiml.enqueue({ workflowSid:"mysid" }, function(node){ node.task(JSON.stringify(taskData)) }); // nope
//var enqueueNode = twiml.enqueue({ workflowSid:"mysid", }, function(node){ node.Task(JSON.stringify(taskData)) }); // nope
//var enqueueNode = twiml.enqueue({ workflowSid:"mysid" }, "<Task>" + JSON.stringify(taskData) + "</Task>"); // nope
twiml.enqueue does not appear to return a value (like gather), so no luck there. I've also tried manually creating the twiml via a string, but I don't know how to set the Content-Type in a twilio Function on the response, so no dice. I'd be OK with that as a starting solution.
The docs are pretty sparse, so any help is much apprecitated.