Genesys Engage on-premises

 View Only

Discussion Thread View
  • 1.  Retrieve custom fields in SCXML

    Posted 08-29-2018 17:59
    I am trying to retrieve custom fields from "callresult" event in SCXML with _event.data.fields prefix but it seems the prefix is not defined in this event. Can someone please help point a direction of how to retrieve any mandatory and custom fields in "callresult" event? 

    Thanks!

    ------------------------------
    Henry
    ------------------------------


  • 2.  RE: Retrieve custom fields in SCXML

    Posted 08-30-2018 02:21
    Hey Henry,

    Might want to flag this is an OCS SCXML question, as a lot of people will probably assume your talking about ORS SCXML and be a little confused.

    Anyway, the reason this is not addressable is because the callresult only returns a single property.  That is the call result :)

    If you want to know the value of fields at any point, you need to capture them at the point of the ocs.next_record event and then assign them to your data model. Something like the below:

    <datamodel>
    <data ID="chain_id" expr="'0'"/>
    <data ID="custom_field_v" expr="'default'"/>
    </datamodel>
    ....
    <state id="NextRecord">
    <onentry>
    <ocs:next_record/>
    </onentry>
    <transition event="ocs.next_record" cond= "_event.data.record_id == '0'" target="end"/>
    <transition event="ocs.next_record" cond= "_event.data.record_id != '0'" target="MakeCall">
    <assign location="_data.record_id" expr = "_event.data.record_id" />
    <assign location="_data.custom_field_v" expr = "_event.data.custom_field" />
    </transition>
    </state>


    Regards,

    ------------------------------
    Jason Mclennan
    Commonwealth Bank of Australia
    ------------------------------



  • 3.  RE: Retrieve custom fields in SCXML

    Posted 08-30-2018 11:53
    Thank you Jason for the clarification! Yes, it is for OCS, not ORS.

    As we are using PowerGVP, the logic is, retrieve the record with "next_record", make the outbound call, the call is connected to IVR, IVR makes changes on custom fields, then the logic comes back to SCXML where at this point, I need to query the custom fields and determine to continue or end the call based on the value of the custom fields. So I was expecting the "callresult" event to return the updated custom fields but as you mentioned, it returns the callresult property only.

    I am currently firing another "next_record" action to retrieve the same record that was being called, but I wonder if this is the right way, or if there are any better ways.

    Thanks.

    ------------------------------
    Henry
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources