I have an issue. here is my flow: agentA-->taskRouter-->agentB. I know how to pass data(some additional customer info) from taskRouter to agentB(by attribute), but I don't know how agentA pass data to my taskrouter.(or how taskrouter receive the data)
Asked
Active
Viewed 164 times
0
-
Are you working within Flex or just using TaskRouter in your own system? – philnash Aug 08 '21 at 23:31
-
I use both Flex and TaskRouter. – Margie.chen Aug 09 '21 at 01:28
-
the taskRouter works like this: call-->taskRouter--->flex-->salesforce. In step: call ---> taskRouter, I want to know how to pass data? the call is from other platform, like Uber, apple...... – Margie.chen Aug 09 '21 at 01:34
-
In your Flex config, do incoming calls go through the Studio flow? – philnash Aug 09 '21 at 01:35
-
no. not go through the Studio flow. – Margie.chen Aug 09 '21 at 01:40
1 Answers
0
Twilio developer evangelist here.
To pass data to other agents on a task through Flex, you can add further attributes to your task from within the Flex interface.
You would need to build a Flex plugin that allows you to add that data. I have an example Flex plugin that adds a text input to the task panel and allows agents to use it to set the customer name in the task attributes.
Once you have access to the task
object, you can update the attributes with the function:
task.setAttributes(newAttributes);
setAttributes
does overwrite existing attributes, so ensure you don't lose all the existing attributes like so:
const newAttributes = { ...task.attributes, name: this.state.name };
task.setAttributes(newAttributes);
This will update the attributes on the task that another agent will then see when they are assigned the task.

philnash
- 70,667
- 10
- 60
- 88
-
"To pass data to other agents on a task through Flex". it's incorrect I want to pass data to my flex from other agent. – Margie.chen Aug 09 '21 at 01:39
-
-
For example, an agent(other platforms) call in my studio flow, and my studio flow rout to flex. During this period, I don’t want to accept this call through studio flow. I want task router accepted the call and accept the parameters passed by the call – Margie.chen Aug 09 '21 at 01:50
-
You can add attributes to the task as part of the Studio flow when you use the Send To Flex Widget. Can you explain how you would expect the third party agent to provide other data? – philnash Aug 09 '21 at 02:14
-
in other words. Does twlio support incoming calls with parameters? – Margie.chen Aug 09 '21 at 03:27
-
How would you pass those parameters? How is it that you are redirecting this call into Twilio? – philnash Aug 09 '21 at 04:56