Webchat: Unable to deliver phone number & email id to agent screen via script

Hi Team,

I am using webchat widget2 and developed a simple flow, trying to deliver phone number & mailid in agent script column however I get only first name and lastname not others.

step 1: send response (welcome)

step 2: set screen pop with script chat
On the chat script I added 4 properties
{{Chat.Customer First Name}}
{{Chat.Customer Last Name}}
{{Chat.Customer Phone Number}}
{{Chat.Customer Email}}

Step 3: Transfer to ACD

Once it reaches the agent, I am seeing the {{Chat.Customer Phone Number}} & {{Chat.Customer Email}} to be empty. But under interaction details I can see emailid.

I use developer tools to test the where I did filled the emailid & Phone number.

Can I get help on this to deliver mail id & phone number in script to agent?

Hello,

Are you using the Web Chat sample in Developer Tools (targeting a Widget v2 deployment)?
Are you typing your phone number in the Phone field (under Chat Data section), before clicking on Start Chat button?
If yes, the value should be available using {{Chat.Customer Phone Number}} in a Text component.

There is a second way to retrieve this parameter value (and others).
You can define/add a variable in your script (Type String), with Name = phoneNumber and with the "Input" toggle enabled (i.e. Input = Yes)
You can then display it in a Text component using {{phoneNumber}}

That's also how to retrieve email.
{{Chat.Customer Email}} is not available with Widget v2/Chat v2.
Define/add a variable in your script, using Type String, with Name = email and with the "Input" toggle enabled (i.e. Input = Yes)
You can then display it in a Text component using {{email}}

When you define a variable, and enable the "Input" toggle, it means that when the script is loaded, it will try to find corresponding attributes (participant attributes with the same name) in the conversation context, and load their value in the Script variable.
On the Widgets v2 side, the information you collect in the Chat Registration Form (default registration form or custom one) and the information you provide via userData, will be propagated to the conversation, as participant attributes.

What matters is the name you use, on Widgets side, for your parameter.

If you collect the information via the Default or a Custom Chat Registration Form, it is the name of the field which matters.
I mean that if you have defined a field like the following:

{
    id: 'my_custom_parameter1',
    name: 'customParameter1',
    maxlength: '100',
    placeholder: 'label displayed when parameter value is empty in UI',
    label: 'label for this parameter in the UI',
}

The value will be stored in the conversation participant attributes as "context.customParameter1" and will be available in Script using a variable named customParameter1, with Input toggle enabled, and referencing it via {{customParameter1}}

If you send the information via userData, it is the name of the userData key/value pair which matters.

userData: {
    customParameter2: 'ABCD'
}

The value will be stored in the conversation participant attributes as "context.customParameter2" and will be available in Script using a variable named customParameter2, with Input toggle enabled, and referencing it via {{customParameter2}}

See these 2 other posts I gave for more information on Community forum and on Dev Forum.

Regards,

1 Like

Thank you for the help. That helped me!
Cheers

May I ask one more question, I use Genesys Dialog engine.
I create 10 intents, if I add the bot to architect i see 10 call branches. Is there a way to restrict the branches in a represent 3 or 5 instead of showing all 10 intent branches in a bot?

Hello,

Unfortunately, I don't have experience with Genesys Dialog Engine.
The Genesys Cloud Community Forum may be a better place for such question.

Still, reading the page on the Call Dialog Engine Bot action in the Resource Center, I would say no.
I mean that if you really want to have each intent treated differently (not able to "group" them) and if you defined/configured each of them as an end of conversation intent, then you will have these 10 branches.
Now, if you have nothing specific to do in the Architect flow on some of the intents, you could just avoid configuring them as end of conversation intent (and they will not appear as a branch in the Architect bot action.

Regards,

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.