Judy007
Judy007

Reputation: 5870

Using Twilio Flex Plugin, how do I update the current voice task attribute so that customer name shows in TaskListItem?

I would like to know how I can update the task attribute so that the customer name is set to whatever name I want, instead of the E.164 formatted phone. enter image description here

I would like to invoke the setter from within the plugin init

init(flex, manager) {

I imagine this is a common use case that customers would like. How can I accomplish this? Where exactly are these attributes set?

Upvotes: 0

Views: 895

Answers (1)

Judy007
Judy007

Reputation: 5870

I figured it out. I after accepting the task, you just need to run

            flex.DefaultTaskChannels.Call.templates.TaskListItem.firstLine = matchingCustomerName;
            flex.DefaultTaskChannels.Call.templates.TaskCanvasHeader.title = matchingCustomerName;
            flex.DefaultTaskChannels.Call.templates.CallCanvas.firstLine = matchingCustomerName;
            flex.ParticipantCanvas.Content.replace(<h3 key="name">{matchingCustomerName}</h3>);

Upvotes: 2

Related Questions