Add custom field into Genesys Chat/Email widgets

Hi guys
I have been looking around and couldn’t find a way (documented and supported at least) on how to add a custom field into the Widgets…for example Passport Number, ID, some drop down object…
any idea?

Follow this link https://docs.genesys.com/Documentation/GWC/G-NINE/WidgetsAPI/CustCRF

I have done that but it doesn’t go as a KVP as first fields.
I see there is a userdata property but no clue on how to work with it…

Also this is for Chat, but no mention of email form…
Will ask support if it is the same

As far as I can tell from reading the docs, you can’t edit or add to the out of the box registration forms but you can create your own..

I found these links they seem like they might be useful (haven’t actually tried doing it yet though)

https://developer.genesys.com/2017/08/31/draft-genesys-widgets-customization-starting-with-simple-examples-i/

https://developer.genesys.com/2017/09/15/genesys-widgets-customization-filling-registration-form-data-ii/

Creating an account is free and instant if you don’t have one

I have checked those already, and still they are fixed with same fields, no sample which add a new one anywhere.
They show how to interact with the JScript part, I want to add custom KVPs and fields as are usually done at customer needs.

Ok, I can attach data from the call.


dataURL: "http://192.168.0.110:8380/genesys/2/email/TEST1",
            apikey: "",
            userData: {var2:"jojojo"},




            SendMessageButton: {
            enabled: true
            }

But now need to add to this userData JSON some value from a the form field.
Will keep testing

OK found it

You first need to find this line:


c.userData = n

Then add


c.userData = n, 
c.userData.var99 = a("#cx_sendmessage_form_var1").val(),

where #cx_sendmessage_form_var1 is the form field you added before (following Genesys docs)
and var99 is the KVP key name you want.

So at logs I have now:




12:05:20.099 Dbg 09900 SendEmailTask webRequestId [10000014], Sending request to E-mail Server: 'RequestCreateWebEmailIn'('50')
message attributes:
FromAddress = [email removed]
ReferenceId = 10000014
QueueEndpoint = default
Mailbox = [email removed]
UserData = KVList: 
   'var99' [str] = "Var1cavagnaro"
   'var2' [str] = "jojojo"
FirstName = Jorge
Text =  ewfdsfs
LastName = Cornejo
Subject = Test1

Works fine

If someone finds an easier way to do so please share

Hi,
I see in the widgets.min.js command “Survey.open”
who has ideas for this use case? ???

Guess will be the webform used on WebAPI to send surveys