" /> Attached data from Web page to ORS Engagement strategy - Genesys CTI User Forum

Author Topic: Attached data from Web page to ORS Engagement strategy  (Read 2117 times)

Offline vma

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 0
Attached data from Web page to ORS Engagement strategy
« on: March 23, 2017, 11:49:21 AM »
Advertisement
Hi guys,

can anyone please help with an problem I have with the web engagement strategy?
I need to send a specific custom page ID from the web page to the ORS engagement strategy either as a specific KVP or in the jsonEvent key but I can seem to find how this is done. I have the initial _gt.push(['config'... in the instrumentation script where dslResource, httpEndpoint, etc is being sent. Can I put one more data here and somehow catch it on the other side (ORS strategy)?

Thanks,
vma
« Last Edit: March 23, 2017, 11:52:26 AM by vma »

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Attached data from Web page to ORS Engagement strategy
« Reply #1 on: March 23, 2017, 12:08:40 PM »
If the custom PageID is accessible through the DOM you can easily use the DSL for that. In other cases, you have to send these data directly from front-end web pages through available API as is described in documentation.

Offline vma

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 0
Re: Attached data from Web page to ORS Engagement strategy
« Reply #2 on: March 23, 2017, 12:20:48 PM »
Hi Kubig,

in dsl I have a basic 30 secs timeout event

<event id="Timeout-30" name="Timeout-30">
<trigger name="TimeoutTrigger" element="" action="timer:30000" type="timeout" url="" count="1" />           
</event>

How do I declare here a custom data? and how can I retrieve this in the routing? The data is available through DOM so this is not a problem.
I can't find this process described in the documentation.

Thank you,
Mihai

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Attached data from Web page to ORS Engagement strategy
« Reply #3 on: March 23, 2017, 12:45:03 PM »
Hi vma,

Look at GWE API Reference, section Business Events DSL, <val> element. There is even a sample in the guide.

R.

Offline vma

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 0
Re: Attached data from Web page to ORS Engagement strategy
« Reply #4 on: March 24, 2017, 02:23:27 PM »
Thanks Rene,
that helped alot somehow I missed that chapter.
Now I added an attached data to the dsl event and I can see it in GWE and routing but without any value. I tried for the sake of testing with a hardcoded value:

<event id="Timeout-30" name="Timeout-30">
<trigger name="TimeoutTrigger" element="" action="timer:30000" type="timeout" url="" count="1" /> 
<val name="webreason" value="xxx" />
</event>

Still in jsonEvent:
Engagement Profile [305ddc74-ae41-4736-b078-9bfe96994052] was updated with UserData [{"HotLead_globalVisitI... \"webreason\":\"\",\"ixnType\":\"proactiveChat\" ...}]

Do you know why the attached data is being transmited without the value?

Thanks,
vma

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Attached data from Web page to ORS Engagement strategy
« Reply #5 on: March 24, 2017, 02:58:42 PM »
My test GWE is down at the moment so cannot test it. However, documentation says that "Its value can be any JavaScript code which returns a serializable object". It means that server probably treats xxx as an object. I would enclose the value by apostrophes so it's treated as string and not as an object:

<event id="Timeout-30" name="Timeout-30">
  <trigger name="TimeoutTrigger" element="" action="timer:30000" type="timeout" url="" count="1" /> 
  <val name="webreason" value="[color=red]'[/color]xxx[color=red]'[/color]" />
</event>

R.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Attached data from Web page to ORS Engagement strategy
« Reply #6 on: March 24, 2017, 03:01:31 PM »
Or maybe {}?

Offline vma

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 0
Re: Attached data from Web page to ORS Engagement strategy
« Reply #7 on: March 24, 2017, 03:12:40 PM »
This was it! Using apostrophes did the trick!

Thanks a lot René!