SCXML Treatment: Accessing helper fields (gsw_...) returned by next_record

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.
– 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

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

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” />

Is your campaign configured to send campaign name?

If that’s all that’s wrong that would be great!
How do I configure it to send the “Helper fields defined by OCS”?

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?

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?

Any update on this topic ? We’re struggling with getting fields from calling inside SCXML. ??? ??? ??? ??? ???

Did you follow all recommended steps mentioned here?

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 ?

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