Skip to content

Commit

Permalink
Remove queue from routing info on Flex Interactions invitation routin…
Browse files Browse the repository at this point in the history
…g information, to see if it determines the queue from the workflow
  • Loading branch information
stephenhand committed Sep 23, 2024
1 parent 3bb787b commit 07c45ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/transferChatStart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,20 +270,21 @@ export const handler = TokenValidator(
`Transferring conversations task ${taskSid} to worker ${targetSid} by creating interaction invite.`,
);
// Get task queue
/*
const taskQueues = await client.taskrouter
.workspaces(context.TWILIO_WORKSPACE_SID)
.taskQueues.list({ workerSid: targetSid });
const taskQueueSid = taskQueues[0].sid;

*/
// Create invite to target worker
const invite = await client.flexApi.v1.interaction
.get(flexInteractionSid)
.channels.get(flexInteractionChannelSid)
.invites.create({
routing: {
properties: {
queue_sid: taskQueueSid,
// queue_sid: taskQueueSid,
worker_sid: targetSid,
workflow_sid: context.TWILIO_CHAT_TRANSFER_WORKFLOW_SID,
workspace_sid: context.TWILIO_WORKSPACE_SID,
Expand Down

0 comments on commit 07c45ba

Please sign in to comment.