Skip to content

docs: document "has multiple values" response type in Wait for Response#640

Open
SangeetaMishr wants to merge 4 commits into
mainfrom
docs/wait-for-response-has-multiple-values
Open

docs: document "has multiple values" response type in Wait for Response#640
SangeetaMishr wants to merge 4 commits into
mainfrom
docs/wait-for-response-has-multiple-values

Conversation

@SangeetaMishr

@SangeetaMishr SangeetaMishr commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #399

The Wait for Response node's "Response Type" dropdown has a has multiple values option that wasn't documented at all. This adds a "5. has multiple values" subsection under Text-based responses, explaining:

  • How it matches (every word in the contact's reply must come from the response criteria list — the reverse subset check compared to has all of the words)
  • How it differs from has any of the words (which only needs one matching word)
  • A comparison table with example replies against both operators

Verification

The behavior is described directly from the matching logic in glific/glific:

  • lib/glific/flows/case.ex (do_execute(%{type: "has_multiple"} ...), using MapSet.subset?/2)
  • lib/glific.ex (Glific.make_set/2, which shows criteria/replies are split on commas, semicolons, and whitespace, case-insensitively)
  • test/glific/flows/case_test.exs ("test the execute function for has_multiple"), which confirms the subset behavior

Test plan

  • Docs site renders the new section correctly (table + image)
  • Reviewer confirms the described matching behavior against the app

Summary by CodeRabbit

  • Documentation
    • Updated the document “Last Updated” metadata from October 2025 to July 2026.
    • Expanded text-based response guidance for the “has multiple values” option, including allowed-value rules, how invalid responses are determined, and a valid/invalid example with screenshot.

Explains how it differs from "has any of the words" and adds a
comparison example, per user question in #399.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@SangeetaMishr, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e2e248ca-52fa-41dc-8792-2e4f64f191f1

📥 Commits

Reviewing files that changed from the base of the PR and between 0ebb438 and 2e85ec6.

📒 Files selected for processing (1)
  • docs/4. Product Features/03. Flows/2. Flow Actions/04. Wait for the contact to respond.md
📝 Walkthrough

Walkthrough

This change updates a documentation file for the “Wait for the contact to respond” flow action. It changes the “Last Updated” date from October 2025 to July 2026. It also adds a new “5. has multiple values” subsection under Text-based responses, documenting the validation rule, its contrast with “has any of the words,” and an example with a screenshot.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main documentation change for the Wait for Response "has multiple values" option.
Description check ✅ Passed The description is directly related to the documented response type change and summarizes the same feature accurately.
Linked Issues check ✅ Passed The docs now explain what "has multiple values" means, how comma-separated criteria work, and how it differs from "has any of the words".
Out of Scope Changes check ✅ Passed The changes are limited to the requested documentation update, with no obvious unrelated code or scope creep.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request July 3, 2026 04:29 Inactive
Remove bold/backticks/table formatting per review feedback, keep
plain sentences followed by the screenshot.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot temporarily deployed to pull request July 3, 2026 04:32 Inactive
Keep the read-time/level/date header untouched per review feedback
so the diff only shows the new section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot temporarily deployed to pull request July 4, 2026 07:35 Inactive
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/4`. Product Features/03. Flows/2. Flow Actions/04. Wait for the contact
to respond.md:
- Around line 77-87: Clarify the “has multiple values” section by describing it
as an all-tokens/subset match: every word in the contact’s reply must be present
in the configured criteria, and any extra word makes it invalid. Update the
wording in the “has multiple values” docs to make the usage boundary explicit
versus “has any of the words,” and specify whether commas are only used to
separate the criteria values or also expected in the contact response.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 86f07c55-53c9-407b-92da-8d3d451fb976

📥 Commits

Reviewing files that changed from the base of the PR and between e53d80b and 0ebb438.

📒 Files selected for processing (1)
  • docs/4. Product Features/03. Flows/2. Flow Actions/04. Wait for the contact to respond.md

Comment on lines +77 to +87
### 5. has multiple values
Accepts the input only if every word in the response is one of the values defined in the response criteria. Multiple values can be added, separated by commas, and the response is checked the same way.

The contact does not need to send every value from the list and can send them in any order, but the response is valid only if all the words in it come from the defined list. If the response includes even one word that is not in the list, it is treated as invalid.

This is the opposite of has any of the words, which accepts the response if even a single word matches, regardless of the rest of the response.

Example: Criteria = Math, Science, English, History. A response of Math or Math, Science will be valid. A response of Math, Art will be invalid since Art is not part of the criteria, even though has any of the words would accept it because Math matches.

<img width="1870" height="1320" alt="Wait for Response node showing the has multiple values option" src="https://github.com/user-attachments/assets/76c8f4ad-707e-4ece-bac0-f1acee14f911" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Clarify the semantics and when to use this option.

The new text explains the rule, but "opposite of has any of the words" is too loose, and the section still doesn’t spell out the intended usage boundary. Please make the comparison explicit as a subset/all-tokens check and confirm whether commas apply only to the criteria list or also to the contact’s reply.

♻️ Proposed wording
-### 5. has multiple values
-Accepts the input only if every word in the response is one of the values defined in the response criteria. Multiple values can be added, separated by commas, and the response is checked the same way.
-
-The contact does not need to send every value from the list and can send them in any order, but the response is valid only if all the words in it come from the defined list. If the response includes even one word that is not in the list, it is treated as invalid.
-
-This is the opposite of has any of the words, which accepts the response if even a single word matches, regardless of the rest of the response.
+### 5. has multiple values
+Use this option when the reply should be limited to a predefined set of values. It accepts the input only if every word in the response is one of the values defined in the response criteria. Criteria values can be entered as a comma-separated list.
+
+The contact does not need to send every value from the list and can send them in any order, but the response is valid only if all words in it come from the defined list. If the response includes even one word that is not in the list, it is invalid.
+
+This differs from has any of the words, which accepts the response if even a single word matches, regardless of the rest of the response.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### 5. has multiple values
Accepts the input only if every word in the response is one of the values defined in the response criteria. Multiple values can be added, separated by commas, and the response is checked the same way.
The contact does not need to send every value from the list and can send them in any order, but the response is valid only if all the words in it come from the defined list. If the response includes even one word that is not in the list, it is treated as invalid.
This is the opposite of has any of the words, which accepts the response if even a single word matches, regardless of the rest of the response.
Example: Criteria = Math, Science, English, History. A response of Math or Math, Science will be valid. A response of Math, Art will be invalid since Art is not part of the criteria, even though has any of the words would accept it because Math matches.
<img width="1870" height="1320" alt="Wait for Response node showing the has multiple values option" src="https://github.com/user-attachments/assets/76c8f4ad-707e-4ece-bac0-f1acee14f911" />
### 5. has multiple values
Use this option when the reply should be limited to a predefined set of values. It accepts the input only if every word in the response is one of the values defined in the response criteria. Criteria values can be entered as a comma-separated list.
The contact does not need to send every value from the list and can send them in any order, but the response is valid only if all words in it come from the defined list. If the response includes even one word that is not in the list, it is invalid.
This differs from has any of the words, which accepts the response if even a single word matches, regardless of the rest of the response.
<img width="1870" height="1320" alt="Wait for Response node showing the has multiple values option" src="https://github.com/user-attachments/assets/76c8f4ad-707e-4ece-bac0-f1acee14f911" />
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 77-77: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/4`. Product Features/03. Flows/2. Flow Actions/04. Wait for the contact
to respond.md around lines 77 - 87, Clarify the “has multiple values” section by
describing it as an all-tokens/subset match: every word in the contact’s reply
must be present in the configured criteria, and any extra word makes it invalid.
Update the wording in the “has multiple values” docs to make the usage boundary
explicit versus “has any of the words,” and specify whether commas are only used
to separate the criteria values or also expected in the contact response.

@github-actions github-actions Bot temporarily deployed to pull request July 4, 2026 07:37 Inactive
@SangeetaMishr SangeetaMishr self-assigned this Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Has multiple values | Add in documentation

2 participants