Delete All User Data
The following SCXML strategy shows how to delete all user data from an interaction.
<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:ixn="http://www.genesyslab.com/modules/interaction" initial="initial"> <state id="initial"> <transition event="interaction.added" target="setudata"> <script> _data.ixnid = _event.data.interactionid; </script> </transition> </state> <state id="setudata"> <onentry> <script> var data = { details : { name : "Smith, John", age : 45 } }; _genesys.ixn.setuData( data, _data.ixnid ); </script> </onentry> <transition event="interaction.udata.changed" cond="_genesys.ixn.interactions[_data.ixnid].udata.details.name=='Smith, John' && _genesys.ixn.interactions[_data.ixnid].udata.details.age==45" target="delete_all_udata"/> </state> <state id="delete_all_udata"> <onentry> <script> _genesys.ixn.deleteuData( "$ALL", _data.ixnid ); </script> </onentry> <transition event="interaction.udata.changed" cond="_genesys.ixn.interactions[_data.ixnid].udata.ORSession==undefined && _genesys.ixn.interactions[_data.ixnid].udata.ORDbid==undefined && _genesys.ixn.interactions[_data.ixnid].udata.ORUrl==undefined && _genesys.ixn.interactions[_data.ixnid].udata.details==undefined" target="exit"/> <transition target="error"/> </state> <final id="exit"/> <final id="error"/> </scxml>
This page was last edited on September 22, 2017, at 13:06.
Comments or questions about this documentation? Contact us for support!