Skip to main content
iVentureTeam

chatbot_triggering_answers_widget

Tags for the answers that trigger a chatbot step, filtered to the script you are editing. It does that by writing into the user's own context, which is an unusually blunt way to pass a filter.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated September 7, 20265 min read
Technical namechatbot_triggering_answers_widget
Field typesmany2many
Viewsform, list
Moduleim_livechat, Live Chat and chatbots
Used in core1 occurrence, the chatbot script step form in im_livechat
VersionsOdoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. It relies on a server-side domain keyed off the context it writes
Alternativesmany2many_tags, chatbot_steps_one2many, many2many

What the chatbot answers picker does

A chatbot script is a sequence of steps, and a step can be made conditional on how the visitor answered an earlier question. Choosing those triggering answers means picking from the answers defined elsewhere in the same script, and only that script: answers from an unrelated chatbot would be meaningless.

The filtering itself is server side, driven by a domain that reads a key from the context. This widget's job is to put that key there. When it starts, it writes the current script's identifier into the user's context, and from then on the answer search is narrowed.

Nothing else about the field changes. The tags, the dropdown and the creation behavior all come from the tags widget it extends.

What this means for your team

Chatbot scripts get long, and a picker offering every answer in the database rather than the eight in front of you turns a two second choice into a hunt. This is a small filter with a real effect on how usable the builder is.

The mechanism, though, is worth understanding before copying it. Writing into the user context to pass a filter is effective and blunt: the entry is not scoped to the field or the view, so it stays for the session and applies wherever that key is read. In a single-purpose builder screen that is acceptable; as a general pattern it is not, and passing a domain or a context on the field is the cleaner route.

The other thing to note is that this screen changes in the next version. The widget is gone from the development branch, which suggests the filtering has been reworked rather than removed, but any customization of the step form should be re-checked before that upgrade.

Supported options in Odoo 19

The widget declares no options of its own and inherits the tags widget's descriptor. Its one behavior is the context write, described in the note. Read from im_livechat_chatbot_script_answers_m2m.js, Odoo 19.0.

OptionTypeWhat it does
force_domain_chatbot_script_idcontext key written by the widgetWritten into the user's context at startup with the current script's id, and read by the server-side domain on the answers field. Not scoped to the field or the view.
no_createbooleanInherited from the tags widget. Removes creation from the dropdown.(default: false)
no_quick_createbooleanInherited. Removes creation from the typed text while keeping the popup form path.(default: false)
color_fieldfieldInherited from the tags widget. Names an integer field used to color the tags.

The filter travels through the user context. The widget writes a key naming the current script, and the server-side domain on the answers field reads it. Because it is written to the user's context rather than to the field's, it is not scoped to this field or even to this view once set.

Working examples

The core usage

<field name="triggering_answer_ids"
       widget="chatbot_triggering_answers_widget"/>

No options. The narrowing happens through the context the widget writes when it starts.

What it writes

# into the user's context, once, at startup
force_domain_chatbot_script_id: <the script's id>

Only when the script has already been saved; a new script has no id to write.

The plain tags widget

<field name="triggering_answer_ids"
       widget="many2many_tags"/>

Same appearance, but the dropdown offers answers from every chatbot script.

A filter written into the user's context

The widget is a dozen lines. Its initialization calls the parent's and then, if the form's root record has a database id, updates the user's context with a key naming that script. A comment above it states the purpose exactly: force the script being edited into the context so triggering answers can be filtered to steps of that script.

Three consequences follow, and all three are worth weighing before reusing the approach.

The write happens once at startup, so opening a different script in the same session overwrites the key rather than adding to it. That is fine for a form where only one script is open at a time.

The guard on the record id means a brand new, unsaved script never writes the key, so the answer list is unfiltered until the script is saved. On a new script there are no answers to offer anyway, so this rarely shows.

And the context is the user's, not the field's. Nothing clears it when the widget is destroyed, so the key remains for the rest of the session. Anything else reading that key would see it, which is why this is a pattern to recognize rather than to adopt.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The widget and its file are absent from the development branch.
Odoo 19.0VerifiedVerified against the shipped source. Identical to Odoo 18.
Odoo 18.0VerifiedSame context write and same guard.
Odoo 17.0VerifiedSame purpose with older component conventions.
Odoo 16.0VerifiedSame purpose with older component conventions.

Upgrade note. No view change is needed between Odoo 18 and Odoo 19, where the file is identical. The change to plan for is the next version, where the widget is absent entirely and the step form will need re-checking.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify the page after release.

The widget is gone. There is no registration under this name on the development branch, and the file is absent from the module. The chatbot builder has been reworked around it.

Because an unknown widget name falls back to the field's type, a custom view still naming it would render plain tags with no filtering at all, offering answers from every script. Search custom livechat views for this name before upgrading.

Common problems and fixes

SymptomCause and fix
Answers from other scripts are offeredThe context key was never written, usually because the script has not been saved. Save the chatbot script; the key is only written when the record has an id.
The wrong script's answers are offeredThe key was written for another script earlier in the session and not cleared. Reload the page. Nothing clears the key when the widget is destroyed.
The filtering does nothingThe server-side domain on the field does not read that context key. Check the field definition; the widget only supplies the key.
Options are ignoredThe widget declares none of its own; the inherited tag options work normally. Use the tags widget's options as usual.
The filter disappeared after upgradingThe widget is absent from the next version, so the name falls back to the field's type. Re-check the step form and how filtering is done in that version.
Missing widget errorThe live chat module is not installed in that database. Install Live Chat, or use the plain tags widget.

Chatbot answers picker vs the alternatives

WidgetBest forKey difference
chatbot_triggering_answers_widgetNarrowing a relation to the record being edited, inside the chatbot builderWrites a filter key into the user's context at startup rather than passing a domain
many2many_tagsAny relation shown as tagsNo filtering, so every record is offered
chatbot_steps_one2manyThe steps list in the same builderThe list this field lives beside, with its own saving behavior
many2manyA relation shown as a tableColumns rather than tags

The plain tags widget gives the same interface without the filtering. Where you need a relation narrowed by another record, a domain on the field is the conventional route and is scoped properly, and passing a context on the field element is the next best option. Writing to the user context should be a last resort.

Frequently asked questions

How does it filter the answers?+
It writes the current chatbot script's id into the user's context when the component starts, and the server-side domain on the answers field reads that key. The filtering itself is server side.
Why is nothing filtered on a new script?+
The write is guarded on the form's root record having a database id, so an unsaved script writes nothing. In practice a new script has no answers to offer yet.
Does the context entry get cleaned up?+
No. It is written to the user's context and nothing clears it when the widget is destroyed, so it remains for the session. That is the main reason not to copy this pattern.
Does it support options?+
None of its own. The inherited tags options, including creation controls and the color field, all work normally.
Does it exist in Odoo 20?+
Not on the development branch. The file and the registration are both gone, so a view still naming it would render unfiltered tags.

Chatbots that hand over at the right moment

Script design, handover rules and the reporting behind them decide whether a chatbot deflects work or creates it. We build Odoo Live Chat and chatbot flows on versions 16 through 19.

Book a free consultation

How this page was produced

The context write, its guard on the record id and the source comment explaining its purpose were read from im_livechat_chatbot_script_answers_m2m.js on the Odoo 19.0 branch, with the inherited behavior read from the tags field in web. The usage comes from im_livechat/views/chatbot_script_step_views.xml. Version coverage comes from comparing the file across the 16.0, 17.0 and 18.0 branches, and the removal was verified by searching the public development branch and listing the module's script directory there. Spotted an error? Tell us and we will correct the page.