Sorry for my late response.
I was very busy,
Use the Same userId for a Caller
If you keep the same userId across conversations, Botpress groups them and retains context.
{
"userId": "caller-123",
"userData": { "phone": "+1234567890" }
}
Store Context Within a Conversation
If you only need short-term memory (within a single call), let Botpress track context inside an active conversation.
Botpress automatically maintains context during a conversation session without requiring long-term storage.
Use an External Database for Deep Memory (Optional)
If Botpress memory resets too frequently, you may need your own database (like Firebase, PostgreSQL, or ChromaDB) to store user history and fetch it as needed.
If a user asks: "What was the last advice you gave me?"
The bot can query an external DB to retrieve past responses.
If you're directly calling Botpress API from your backend (e.g., Python, FastAPI, or Node.js), you DON’T need it.
If you're integrating with a channel like WhatsApp, Webchat, or Twilio, you must pass the correct x-integration-id.