Unfortunately it seems that this solution is not bulletproof.
if any of these keys are containing German characters the callback is not delivered anymore...
I believe it could be an issue with the encoding on the ORS..
in the call call/start request I see
extensiondata=personal-reference%3AETI+Mitgliedschaft+R%C3%BCckholung (%C3%BC being ü)
although encoding on ORS is UTF-8
09:33:28.437 {ScxmlConfig:1} Reading SECTION[scxml] CONFIGITEM[default-encoding] = VALUE[UTF-8]
I have opened a Genesys case for this hoping they can help me.
Mihai
------------------------------
Mihai Vasiloiu
Swisscom (Schweiz) AG
------------------------------
Original Message:
Sent: 10-22-2020 15:59
From: Jim Crespino
Subject: Callback parameter available in URS routing
I'm glad to hear you figured out a way to make it work.
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com
Original Message:
Sent: 10-21-2020 11:09
From: Mihai Vasiloiu
Subject: Callback parameter available in URS routing
Hi Jim,
First of all thank you for your answer but unfortunately these parameters are not being sent to routing by default.
Actually I managed to make this work myself using a combination of
"Passing Configuration Tokens in Queries" from https://docs.genesys.com/Documentation/GMS/latest/API/CallbackServicesAPI
and
_urs_extension_data option on the service
These parameters that are sent via the HTTP Request are not sent by default to the URS routing strategy. They are attached by ORS after the response to replyurl is done by URS.
Here is how I think all this works:
1. GMS is called via its API (with the custom parameters)
2. GMS send a request for routing to ORS
3. ORS makes a http request to URS (urs/call/start) with a specific set of ExtensionData to create a VCall, not including the custom parameters
4. URS goes through the WaitForTarget Strategy and selects the agent and it doesn't send this interaction to the agent but a reply to ORS with the target
5. ORS attached the rest of the data (custom parameters)
6. ORS now requests TServer to invite the agent via a EventUserEvent with these custom parameters (this is how custom parameters are present in WDE Case Data)
As you can see, at step 3 when the URS strategy is triggered, we don't have the custom parameters yet but if you use tokens as I suggested in the beginning you can send any of these parameters in the extensiondata field which you can then read in the routing.
This is an example of the urs/call/start. You can see in there: extensiondata=PersonalReference%3D100111615%2CDispLanguage%3DGerman
16:51:14.541_R_I_ [19:10] routing interface request received: urs/call/start?tenant=Resources&strategy=WaitForTarget¬ifyurl=undefined&replyurl=http%3A%2F%2Fxx.xx.xx.xx%3A8082%2Fgenesys%2F1%2Fors%2Fscxml%2Fsession%2FSOUDHINT712JH9TUJEBBNG34LS00001B%2Frequest%2Fmethod_urs_request_route_done&replybody=%5Btargetj%5D&replyenc=application%2Fjson&replyack=true&sync=1&udata._CB_SERVICE_ID=235-5138f2ca-fc4b-4299-b8d4-7eeff1a47f5d&udata._CB_T_SERVICE_START=1603291874&udata._CB_T_CALLBACK_ACCEPTED=1603291920&udata._CB_T_NEXT_REDIAL_ATTEMPT=undefined&udata._CB_N_IS_SNOOZED=false&udata._CB_N_CALLBACK_MEDIA_ATTEMPTS=0&udata._CB_T_LAST_DIAL_ATTEMPT=undefined&udata._CB_N_AGENT_ADDED_TO_IXN=0&udata._CB_N_CALLBACK_ACCEPTED=1&udata._CB_DIM_CHANNEL=WEB&udata._CB_DIM_TYPE=WAIT_FOR_AGENT&VQ_TARGET=VQ_TestCallback_DE&ROUTE_DELAY=10&TARGET_REQUESTED=%5B%7B%22target%22%3A%22VAG_Test_Callback_DE%40STAT_SERVER_URS_1.GA%22%2C%22timeout%22%3A%22180%22%2C%22clear%22%3Atrue%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%2C%7B%7D%5D&TARGET0=%7B%22target%22%3A%22VAG_Test_Callback_DE%40STAT_SERVER_URS_1.GA%22%2C%22timeout%22%3A%22180%22%2C%22clear%22%3Atrue%7D&TARGET1=%7B%7D&TARGET2=%7B%7D&TARGET3=%7B%7D&TARGET4=%7B%7D&TARGET5=%7B%7D&TARGET6=%7B%7D&TARGET7=%7B%7D&TARGET8=%7B%7D&TARGET9=%7B%7D&TARGET10=%7B%7D&TARGET11=%7B%7D&TARGET12=%7B%7D&TARGET13=%7B%7D&TARGET14=%7B%7D&DO_NOT_SELECT_CALL=1&PRIORITY=40&PRIORITY_INCREMENT=14&PRIORITY_INCREMENT_INTERVAL=300&PRIORITY_MAX=110&PRIORITY_MIN=0&MEDIA_TYPE=voice&extensiondata=PersonalReference%3D100111615%2CDispLanguage%3DGerman&MediaType=voice&INTERACTION_AGE=&GMS_SERVICE_ID=235-5138f2ca-fc4b-4299-b8d4-7eeff1a47f5d&ORS_SESSION_ID=SOUDHINT712JH9TUJEBBNG34LS00001B&DIAL_OUT_SUCCESS_RATE=85&EXCLUDE_AGENT=, client=832(OR_Server), ref=1594
Regards,
Mihai
------------------------------
Mihai Vasiloiu
Swisscom (Schweiz) AG
Original Message:
Sent: 10-20-2020 14:51
From: Jim Crespino
Subject: Callback parameter available in URS routing
If you are in a test environment, then I'd suggest to turn on debug logging for URS. Then look into the log file for the callback interaction that is being routed and look at the user data in the structure. There is a good chance that callback custom key names are being prefixed with something. Once you find out what the actual key name is then you'll be able to query for it in the routing strategy.
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com
Original Message:
Sent: 10-19-2020 11:19
From: Mihai Vasiloiu
Subject: Callback parameter available in URS routing
Hi guys,
I've configured a callback service using GMS and ORS.
All works well and if I set a parameter when creating the Callback Request I can see it in the WDE Toaster and Case Data.
The thing is that I would like to have this parameter in URS routing also.
Example:
I create the callback with:
I've configured in the callback service:
_attach_udata=separate_keys
_urs_udata_xfer_keys=str_value1
But in the WaitForTarget strategy when I try to attribute this value to a variable
StrValiable=UData['str_value1']
it comes up empty. I would have expected "Info1"
Do you know who can I check the value of this parameter in URS?
Thank you!
#DigitalChannels
#GMS
#GenesysCallback
------------------------------
Mihai Vasiloiu
Swisscom (Schweiz) AG
------------------------------