endSession

The endSession method marks the end of the runtime session. When the runtime server receives this method, the runtime server logs to history, clears memory, and so on.

function callEndSession(commandsToExecute, callback) {

        var ssId = document.getElementById('es_sessionId').value;

        InteractAPI.endSession(ssId, callback);

}
  • session ID - Unique string identifying the session.
  • callback - If the method was successful, the callback function calls onSuccess. If the method failed, the callback function calls onError.

If the endSession method is not called, runtime sessions timeout. The timeout period is configurable with the sessionTimeout property.

Return value

The runtime server responds to the endSession method with the Response object with the following attributes populated:

  • SessionID
  • ApiVersion
  • OfferList
  • Profile
  • StatusCode
  • AdvisoryMessages