Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: cavagnaro on November 17, 2017, 07:10:42 PM
-
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.
[code]
dataURL: "http://192.168.0.110:8380/genesys/2/email/TEST1",
apikey: "",
userData: {var2:"jojojo"},
SendMessageButton: {
enabled: true
}
[/code]
But now need to add to this userData JSON some value from a the form field.
Will keep testing
-
[font=verdana, arial, helvetica, sans-serif]OK found it[/font]
[font=verdana, arial, helvetica, sans-serif]You first need to find this line:[/font]
[code]
c.userData = n
[/code]
[font=verdana, arial, helvetica, sans-serif]Then add[/font]
[code]
c.userData = n,
c.userData.var99 = a("#cx_sendmessage_form_var1").val(),
[/code]
[font=verdana, arial, helvetica, sans-serif]where #cx_sendmessage_form_var1 is the form field you added before (following Genesys docs)[/font]
[font=verdana, arial, helvetica, sans-serif]and var99 is the KVP key name you want.[/font]
[font=verdana, arial, helvetica, sans-serif]So at logs I have now:[/font]
[code]
12:05:20.099 Dbg 09900 SendEmailTask webRequestId [10000014], Sending request to E-mail Server: 'RequestCreateWebEmailIn'('50')
message attributes:
FromAddress = cavagnaro.jc@gmail.com
ReferenceId = 10000014
QueueEndpoint = default
Mailbox = genesys@domaintest.com
UserData = KVList:
'var99' [str] = "Var1cavagnaro"
'var2' [str] = "jojojo"
FirstName = Jorge
Text = ewfdsfs
LastName = Cornejo
Subject = Test1
[/code]
[font=verdana, arial, helvetica, sans-serif]Works fine[/font]
[font=verdana, arial, helvetica, sans-serif]If someone finds an easier way to do so please share[/font]
-
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