Author Topic: Receiving email interactions as JSON objects  (Read 2784 times)

Offline codebug

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Receiving email interactions as JSON objects
« on: January 29, 2018, 04:01:24 PM »
Hello Genesys Gurus

looking into getting genesys email interactions into 3rd party text analytics API.. the API accepts JASON objects.


Any thoughts or pointers how would one achieve that.
how would you get all new emails to be submitted or monitored . by the 3rd party api using genesys SDK.



Sent from my SM-G925I using Tapatalk


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Receiving email interactions as JSON objects
« Reply #1 on: January 29, 2018, 06:06:31 PM »
Exactly which email? Incoming? Outgoing?
The fact your API supports JSON doesn't mean by magic will work if PSDK supports JSON, which does at some points.
There is a input output parameters definitions and for that to work, you will need to adjust to their needs.
So all depends on what exactly are you trying to send to that API and will have to monitor whatever point you want and convert that interaction to JSON provided by your API provider.


Enviado de meu E6633 usando Tapatalk


Offline codebug

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Re: Receiving email interactions as JSON objects
« Reply #2 on: February 04, 2018, 04:46:42 AM »
Hello

Essentially i want to be able to monitor all incoming/outgoing threads and to best received as JSON objects with all attributes available from Genesys  . Then i can reformat the JSON object received to the attributes we need to send to the Text API. how can one monitor all the interactions and to be received as JSON Objects

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Receiving email interactions as JSON objects
« Reply #3 on: February 04, 2018, 12:12:33 PM »
Well then as usual you monitor the DN (queue) were all your interactions go, once there, convert the interaction on SDK from XML to JSON by some of the many libraries available at C#


Enviado de meu E6633 usando Tapatalk


Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Receiving email interactions as JSON objects
« Reply #4 on: February 05, 2018, 11:54:24 AM »
If you are using Text Analytics would you not want to wait until the Interaction was finished before sending it for analysis?

If that is the case what you could do is to use the Contacts PSDK to poll for interactions that have an EndDate between a certain range.

Use the request RequestInteractionListGet, create a search criteria based on the interactions endtime, then you can get a list of InteractionIds that meet the criteria.

For each InteractionId returned in the above step you can then use RequestGetIntertactionContent to get the content.

For conversion of the Genesys events to JSON you can either do that yourself, or in Java there is a  Module provided for Jackson ObjectMapper by  PSDK (com.genesyslab.platform.json.jackson2.contactserver) that will serialize/deserialeze to and from JSON. You would still need to bend the JSON to match the requirements of your Text Analytics though.


Offline codebug

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Re: Receiving email interactions as JSON objects
« Reply #5 on: February 06, 2018, 01:58:43 AM »
Thanks Cav and Pete , Pete's suggestion looks is what i am after thanks - need to do some reading  ;D