Overwrite Tags action fail to work on tickets

Issue symptoms

The action Overwrite Tags does not work in Sunshine Conversations and my AI agent. Tags carry over from one ticket and conversation to the next. How do I avoid this situation? This issue confuses my reporting.

Resolution steps

Because the Overwrite action is set to replace tags with ai_agent_start_conversation at the Conversation started event, any session-specific tags added during the flow might remain on the conversation after that session ends.

To clear old tags, keep session tags, and control escalation routing:

At conversation start, run Overwrite conversation tags with a space or blank first to clear inherited tags such as active_incident

Immediately after or at the escalation point in the flow, run Add conversation tags to apply session-relevant tags such as bot_handled. This ensures only intentional tags are present from the start.

If the issue persists, create a configured action using the Sunshine Conversations CRM target and set the task to Clear cached conversation. Add this action at the bot level and set it to trigger on the Session ended event, which fires when the conversation ends, an escalation attempt happens, or the conversation reaches the end of the session duration.

If you expect an agent to use a macro to overwrite tags, ensure the custom role permission linked to the agent has Edit ticket tags enabled.

Following these steps ensures that:

Old tags do not bleed into new conversations, and bot_handled is set correctly for reporting and routing.

The escalation tag is applied only at the right moment, not inherited from a previous session.

You clear the conversation data saved in the session cache within AI agents and force a fresh retrieval of conversation fields at the start of the next session. Tags should not persist on the new ticket after the session ends.