Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: singhisking on July 07, 2015, 02:37:31 PM
-
IS Social Media server support composer strategies or I need to use IRD ?
If yes, can someone share with me sample strategies of composer
We are on verison 8.5 .X for above.
Thanks,
-
Yes, it is possible to create strategy using the SMS within Composer. The flow is almost same as for any other non-voice channel. What is not clear for you within that? Of course, there are some "special" data for specific type of channel. If you do not want to reinvent the wheel, you can use the samples provided from Genesys and migrate them to the ORS.
-
As per Genesys PS, Composer doesn't have all social media specific blocks so have to you IRD.
Also. its not easy to migrate IRD BP/strategies to Composer.
I am checking with Product manager now.
-
Hello all,
Is there a block in IRD to connect with GRE. I want to use GRE(Rules Engine) for checking hours of operation, and other routing decisions ?
Thanks
-
There is no dedicated bkock in IRD for accessing GRE.
Just generic Web service block expected to we be used for that, accessing GRE
is just plain http request.
Set of Macros can be creed in IRD for accessing GRE -similar to those IRD has
to work with Context Services (which also are just plain http requests)
-
Can you share a sample ? I have to use IRD instead of compose for Social Media
-
In about couple of weeks only (have no access to my working enviroments now).
Any specific requst to GRE you have in mind?
-
I want to test retrive hours of operation for department.
Sent from my SGH-I317M using Tapatalk
-
[quote author=terry link=topic=8973.msg40321#msg40321 date=1437593952]
In about couple of weeks only (have no access to my working enviroments now).
Any specific requst to GRE you have in mind?
[/quote]
Gentle reminder [emoji6]
Sent from my SGH-I317M using Tapatalk
-
Details of specific request depends from created/used rule package(s).
On link beloiw there are samples of 2 strategies accessing rule package sample described in "Working Example" section from Genesys Rules System Deployment Guide
One strategy usning macro to access GRE so GRE accessing logic is encapsulated in Macro.
Another strategy do it directly inside itself.
http://www.4shared.com/folder/3gllD8fR/strategies.html
-
Hello Terry,
Thanks a ton for sample. I am able to query the GRE and getting below response.
+++++++++++++++++++++++++
<knowledgebase-response>
<inOutFacts class="named-fact-array">
<named-fact>
<fact class="eservices.hoop.HOOP">
<startTime>8:00 AM</startTime>
<stopTime>8:00 PM</stopTime>
</fact>
<id>customer</id>
</named-fact>
</inOutFacts>
<executionResult>
<rulesApplied>
<string>Row 1 DT-100 qwe</string>
</rulesApplied>
</executionResult>
</knowledgebase-response>
+++++++++++++++++++++
I am assigning the response to variable resultxml as -
I_I_237b026d54344462 [09:04] ASSIGN: resultxml(LOCAL) <- STRING: "<knowledgebase-response>
<inOutFacts class="named-fact-array">
<named-fact>
<fact class="eservices.hoop.HOOP">
<startTime>8:00 AM</startTime>
<stopTime>8:00 PM</stopTime>
</fact>
<id>customer</id>
</named-fact>
</inOutFacts>
<executionResult>
<rulesApplied>
<string>Row 1 DT-100 qwe</string>
</rulesApplied>
</executionResult>
</knowledgebase-response>"
I am not able to parse it , Can you help on how I can parse the startTime and stopTime element values from resultxml variable
tried below in IRD but it always show as empty -
resultlist = KVListGetListValue['[XMLFromString[resultxml]','knowledgebase-response.inOutFacts.named-fact']
resultlist = KVListFindSubList[resultlist,'fact.startTime']
++++++++++++++++
Here is actual log -
19:51:33.523_H_I_237b026d54344462 [08:08] OK InfoMessage (200) is received from server ##HTTPSERVER, refid=18, hint=http
HTTPHeaders Date:Wed, 26 Aug 2015 23:51:33 GMT|Accept-Ranges:bytes|Server:Restlet-Framework/2.1.0|Content-Type:application/xml;charset=UTF-8|Content-Length:416
HTTPBody <knowledgebase-response>
<inOutFacts class="named-fact-array">
<named-fact>
<fact class="eservices.hoop.HOOP">
<startTime>8:00 AM</startTime>
<stopTime>8:00 PM</stopTime>
</fact>
<id>customer</id>
</named-fact>
</inOutFacts>
<executionResult>
<rulesApplied>
<string>Row 1 DT-100 qwe</string>
</rulesApplied>
</executionResult>
</knowledgebase-response>
19:51:33.523_I_I_237b026d54344462 [09:05] >>>>>>>>>>>>resume interp(0), func:GetHttpRequestInfoTLS
_I_I_237b026d54344462 [09:04] ASSIGN: resultxml(LOCAL) <- STRING: "<knowledgebase-response>
<inOutFacts class="named-fact-array">
<named-fact>
<fact class="eservices.hoop.HOOP">
<startTime>8:00 AM</startTime>
<stopTime>8:00 PM</stopTime>
</fact>
<id>customer</id>
</named-fact>
</inOutFacts>
<executionResult>
<rulesApplied>
<string>Row 1 DT-100 qwe</string>
</rulesApplied>
</executionResult>
</knowledgebase-response>"
_I_I_237b026d54344462 [09:04] ASSIGN: resultlist(LOCAL) <- STRING: ""
_I_I_237b026d54344462 [09:04] ASSIGN: resultlist(LOCAL) <- STRING: ""
-
Basically:
- single quotes around '[XMLFromString[resultxml]' and one extr bracket need to be deleted (if they were used):
KVListGetListValue[XMLFromString[resultxml],'.....']
- if result has only one named-fact there is no need to use find functions - value can be accessed directly.
- Function XMLFromString for every XML element returns KVList more complex then just one having list of subelements,
It also returns possible attributes, namespacelabel, value. Specifically every xml element results in KVList with 4
predefined keys - elm (having as value list of subelements), atr (having as value list of attributes), nsl (having as
value namerspace label) and val - value of the element. You can print result of XMLFromString and see yourself.
That means when specifying path to value in functions like KVListGet... names of xml elements need to be interleaved
with qualifiers elm or atr.
Following path
'knowledgebase-response.elm.inOutFacts.elm.named-fact.elm.fact.elm.startTime.val'
means take knowledgebase-response element, inside it take sublement inOutFacts (elm.inOutFacts)
inside it take sublement named-fact (elm.named-fact), inside it take subelement fact (elm.fact) inside it take
subelement startTime (elm.startTime) and inside it takes just its value.
Path like 'knowledgebase-response.elm.inOutFacts.atr.class' would mean
take knowledgebase-response element, inside it take sublement inOutFacts (elm.inOutFacts) and inside it take
attribute with name class.
To put it all together: if you need value of startTime/stopTime in case you described the follwing should work:
varResultList = XMLFromString[resultxml]
varStatrtTime= KVListGetStringValue[varResultList,'knowledgebase-response.elm.inOutFacts.elm.named-fact.elm.fact.elm.startTime.val']
varStoptTime= KVListGetStringValue[varResultList,'knowledgebase-response.elm.inOutFacts.elm.named-fact.elm.fact.elm.stopTime.val']