twilio-professional-services / plugin-chat-sms-transfer

Transfer Chat/SMS Tasks in Twilio Flex
34 stars 33 forks source link

Suggestion: Add comment to clarify that workflowSid might be needed for users with multiple workflows in their Flex TaskRouter workspace #1

Open suman-vanan-dragon opened 5 years ago

suman-vanan-dragon commented 5 years ago

Apologies if this is the wrong channel for suggestions.

In transfer-chat.js, we have:

// create New task
    let newTask = await client.taskrouter.workspaces(context.TWILIO_WORKSPACE_SID).tasks.create({
        taskChannel: originalTask.taskChannelUniqueName,
        attributes: JSON.stringify(newAttributes)
        // workflowSid: 'WWxxx'
       // Might need to add workflowSid
    });

According to TaskRouter docs, "If there is only one Workflow defined for the Workspace that you are posting a task to, then this is an optional parameter, and that single workflow will be used."

Might be a good idea to add a comment there to let a user know that they might need to pass an additional workflowSid property.

Thanks! :)

kkamikawa commented 4 years ago

I add workflowSid and it worked! Thank you.