" /> Social Media Server and Composer Strategies - Genesys CTI User Forum

Author Topic: Social Media Server and Composer Strategies  (Read 6457 times)

Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Social Media Server and Composer Strategies
« on: July 07, 2015, 02:37:31 PM »
Advertisement
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,

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Social Media Server and Composer Strategies
« Reply #1 on: July 07, 2015, 02:40:35 PM »
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.

Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Re: Social Media Server and Composer Strategies
« Reply #2 on: July 08, 2015, 07:49:51 PM »
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.

Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Re: Social Media Server and Composer Strategies
« Reply #3 on: July 20, 2015, 11:13:31 PM »
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

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Social Media Server and Composer Strategies
« Reply #4 on: July 21, 2015, 01:45:52 AM »
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)

Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Re: Social Media Server and Composer Strategies
« Reply #5 on: July 21, 2015, 09:34:16 PM »
Can you share a sample ? I have to use IRD instead of compose for Social Media

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Social Media Server and Composer Strategies
« Reply #6 on: July 22, 2015, 07:39:12 PM »
In about couple of weeks only (have no access to my working enviroments now).
Any specific requst to GRE you have in mind?

Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Re: Social Media Server and Composer Strategies
« Reply #7 on: July 23, 2015, 11:11:31 AM »
I want to test retrive hours of operation for department.

Sent from my SGH-I317M using Tapatalk


Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Re: Social Media Server and Composer Strategies
« Reply #8 on: August 04, 2015, 02:37:48 PM »
[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


Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Social Media Server and Composer Strategies
« Reply #9 on: August 04, 2015, 09:46:55 PM »
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

Offline singhisking

  • Newbie
  • *
  • Posts: 48
  • Karma: 0
Re: Social Media Server and Composer Strategies
« Reply #10 on: August 26, 2015, 11:59:35 PM »
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: ""
« Last Edit: August 27, 2015, 12:04:28 AM by singhisking »

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Social Media Server and Composer Strategies
« Reply #11 on: August 27, 2015, 04:44:30 AM »
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']