Reputation: 5870
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.
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
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