feat(plugin-flow-builder): send contact reasons conditional event when resolve node #BLT-2700 - #3293
Merged
Iru89 merged 8 commits intoOct 5, 2026
Conversation
Iru89
marked this pull request as ready for review
October 2, 2026 11:52
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
vanbasten17
approved these changes
Oct 2, 2026
…ons label in ConditionalContactReasons component
…contact reasons in SystemDebugTrace component
Iru89
deleted the
BLT-2700-plugin-flow-builder-send-contact-reasons-conditional-event-when-resolve-node
branch
October 5, 2026 10:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Hubtype analytics support for the Contact Reasons Conditional flow node and emits a
conditional_contact_reasonsbot event when the node is resolved. The event records the case contact reasons from the session and which branch was taken (a configured contact reason name ordefault).Context
Contact Reasons Conditional nodes route the conversation based on the contact reasons assigned to the Hubtype case. Product and analytics need visibility into which branch was selected and which contact reasons were present at resolution time, consistent with other conditional flow nodes (for example, custom, channel, or country conditionals).
Related ticket: BLT-2700.
Approach taken / Explain the design
@botonic/core: IntroducesEventAction.ConditionalContactReasonsandEventConditionalContactReasonswithcontactReasonsandresultpayload fields.botonic-plugin-hubtype-analytics: AddsHtEventConditionalContactReasonsand wires it increateHtEventso events are serialized with the correct snake_case properties.botonic-plugin-flow-builder:contact-reasons-conditional-matcher.ts(match byproject_idandnameagainstsession._hubtype_case_contact_reasons).FlowContactReasonsConditionalto resolve the follow-up target insetFollowUp, storeconditionalResult, and calltrackFlowfromprocessContentwhen the node is processed (same pattern as other conditional content fields).The analytics
resultis the matched branchname, or the stringdefaultwhen no branch matches.To document / Usage example
No public API changes for bot developers. When a bot flow includes a Contact Reasons Conditional node and Hubtype Analytics is enabled, resolving the node automatically tracks:
Testing
The pull request...
has unit tests
has integration tests
doesn't need tests because... [provide a description]
botonic-plugin-hubtype-analytics/tests/event-conditional-contact-reasons.test.ts: event creation and payload mapping.botonic-plugin-flow-builder/tests/contact-reasons-conditional-matcher.test.ts: contact reason branch matching logic.