newSession
Create a new chat session
Allows you to create a new chat session within Scoopika. This session serves as a container for user interactions with your agents, storing conversation history and potentially user information.
Arguments
Takes one arguments passed as an object
with the following properties:
The session ID to create. should be unique. if not provided a random ID will be generated.
Allows you to associate the new session with a specific user by providing their ID. Including user_id
enables you to later retrieve all sessions belonging to that user using the listUserSessions method.
Allows you to specify the user’s name for this session. Providing a user name can potentially be used by the agent to personalize interactions by addressing the user by name.
Response
Returns a Promise that resolves to the created session as a StoreSession
object.
Was this page helpful?