How You Use Pass-Through Authentication When a Chat Request is Accepted

If you use pass-through authentication (PTA) to log users into your customer portal site, you can use the same login credentials when using the syndicated ProactiveChat widget API, and when a chat request is accepted.

To use PTA, you have to subscribe to the evt_beforeDataRequest event, which is initiated after a chat is accepted and after chat agent availability is checked. In the callback method for the event, you can build your PTA string similar to the way it is done within customer portal code. The encoded PTA string can then be added to the data arguments.

Add code similar to this to the web page containing the widget.

<script type="text/javascript">
    function addPta(type, args, instance){
          var ptaToken = 'thisIsYourEncryptedPTAString';
          var data = args[0];
             if(data){
                 data.pta = ptaToken;
RightNow.Client.Event.evt_beforeDataRequest.subscribe(addPta);
</script> 

In the example, the callback method addPta is called when the event is fired.