...
Code Block | ||
---|---|---|
| ||
function sessionExitPoint(data) { const sessionId = data.sessionId; const identity = data.identity; // logic to retrieve session data goes here return sessionDatamyData; } exports.default = sessionExitPoint; |
Agent Instructions can access session data through the sessionData
variable. For example:
Code Block |
---|
You are helping ${identity.name} work with customer information.
The current customer number is ${sessionData.customerNumber}. |
To access sessionData
within a routine, use pjs.session
. For example: pjs.session.sessionData.customerNumber
.