Integrating Backend proactive messages with Assistant for Contextual Awareness

Hello community,

I’m working on a chatbot application that involves both user-initiated and backend-driven interactions. The chatbot functions well when the user initiates the conversation, but I’m facing a challenge with backend-initiated (BE) interactions.

My goal is to enable the BE to send proactive messages to users while simultaneously updating the assistant about these interactions. This update is crucial for maintaining the context in subsequent user interactions with the assistant. Essentially, when the BE proactively triggers a flow and communicates with the user, the assistant needs to be aware of this interaction to effectively respond to any related user queries.

Is there a way or best practice to relay information from the BE to the assistant without direct user involvement? I am looking for solutions that allow the assistant to be contextually aware of proactive messages sent by the BE.

Any insights or experiences shared in managing similar scenarios would be greatly appreciated!

Thank you!

Gerard

1 Like

Hi! Welcome to the forums!

Disclaimer: I’m not an avid assistants user, but this stuff should still generally apply.

Technically, a message is just a message. In multi-user systems, you can just include the user information with the message, and instruct the model what to do with this infomation.

And in my mind, a user doesn’t have to be human.

So just add a message, and tell your model what that message is supposed to be!