" /> SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record - Genesys CTI User Forum

Author Topic: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record  (Read 5287 times)

Offline jerry_jeremiah

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Advertisement
I would appreciate any advice about this:

In my SCXML treatment, when the ocs.next_record event arrives I want to grab the gsw_campaign_name allong with the calling list fields.  The calling list fields return fine but the gsw_campaign_name always returnes undefined which means it isn't being passed by OCS.  But the manual says:

Response for next_record
  Event properties:
      record_id          -- The OCS-assigned ID of the record in the Calling List.
                                  If it is equal to NULL, no next record is available and
                                  no other event properties are assigned
      contact_info      -- The value of contact_info field for the record in the
                                  Calling List.
      <pseudo-fields> -- Helper fields defined by OCS including:
                                  gsw_chain_attempts: ...
                                  gsw_preferred_flag: ...
      All other fields defined in the Calling List.

When it says "Helper fields defined by OCS including" I assumed that "including" meant the two listed were just examples but ALL the gsw_fields were returned.  I know gsw_campaign_name contains the campaign name because it is passed to the pre dial validation.  Why doesn't it get returned to the SCXML treatment?

Thanks,

Jerry

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #1 on: February 26, 2015, 05:02:48 PM »
Can you attempt to access it in these two ways and let us know if it works:

_event.data.fields.gsw_campaign_name
_event.data.gsw_campaign_name

I can't find any formal documentation around this at the moment, but I remember going through something similar and having to figure it out through the process of trial and error.  My purpose was to gain access to a custom calling list field rather than one of the GSW fields.  Give the above a shot and let us know how it goes.

Regards,
Andrew

Offline jerry_jeremiah

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #2 on: February 26, 2015, 10:00:50 PM »
It works fine for custom calling list fields.  And I had tested both of those combinations before without success.  When I tested it just now to try to retrive gsw_campaign_name I get this in the OCS log:

-> SCXML : 0000014E-040001A2-0001  METRIC <eval_expr expression="_data.record_id;_data.record_id=_event.data.record_id;" result="27" />

-> SCXML : 0000014E-040001A2-0001  METRIC <eval_expr expression="_data.phone;_data.phone=_event.data.fields.contact_info;" result="093585718" />

-> SCXML : 0000014E-040001A2-0001  METRIC <eval_expr expression="_data.campaign_type;_data.campaign_type=_event.data.fields.tm_campaign_type;" result="XYZ" />

-> SCXML : 0000014E-040001A2-0001  METRIC <eval_expr expression="_data.campaign_name;_data.campaign_name=_event.data.fields.gsw_campaign_name;" result="undefined" />

-> SCXML : 0000014E-040001A2-0001  METRIC <eval_expr expression="_data.campaign_name;_data.campaign_name=_event.data.gsw_campaign_name;" result="undefined" />


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #3 on: February 26, 2015, 10:23:19 PM »
Is your campaign configured to send campaign name?

Offline jerry_jeremiah

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #4 on: February 27, 2015, 12:14:17 AM »
If that's all that's wrong that would be great!
How do I configure it to send the "Helper fields defined by OCS"? 

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #5 on: February 27, 2015, 01:10:12 AM »
What I mean is send it as part of attached data type custom field

On OCS Deployment guide check:
campaign_name_field

Basically it reads a field from Calling List with the campaign name stored on it, then you can send it back again.
Will that work?

Offline jerry_jeremiah

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
I think that should work, but I can't do it.  We roll to production tonight and it is too late to remake all the calling list tables - we will have a go in a later revision.  Thanks for the advice - I really appreciate it.

Does anybody know which fields are included in those "OCS helper fields" ?  Is it just the two they specifically mention?

Offline gkhnvrl

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #7 on: December 02, 2015, 02:05:03 PM »
Any update on this topic ? We're struggling with getting fields from calling inside SCXML.  ??? ??? ??? ??? ???

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #8 on: December 02, 2015, 02:24:10 PM »
Did you follow all recommended steps mentioned here?

Offline gkhnvrl

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #9 on: December 09, 2015, 06:58:35 AM »
We found the problem, now we get the fields ! it would be great if a document that shows all OCS helper fields exists  !

Now trying to update user-defined fields on CL.. There's a sample on dep guide, but still we couldn't update CL.
Is it possible to update CL -userdefined fields- via scxml. ie .

We're using the code below in the "onexit" state of makecall :
<ocs:flex_attr attr="'USERDATA'" type="'string'" key="'test_field'" value="'test_value'"/>

One last questions, do you know any editor for scxml treatments, that shows all possible states ?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record
« Reply #10 on: December 09, 2015, 11:50:57 AM »
I do know Genesys developed a nice one, but for internal purposes.... ???
Hopefully they will release it as a GAX Plugin if G is mercyful