Skip to content

docs: add AI fallback use case combining Label the incoming message and Open a ticket#645

Open
SangeetaMishr wants to merge 3 commits into
mainfrom
docs/ai-fallback-label-and-open-ticket
Open

docs: add AI fallback use case combining Label the incoming message and Open a ticket#645
SangeetaMishr wants to merge 3 commits into
mainfrom
docs/ai-fallback-label-and-open-ticket

Conversation

@SangeetaMishr

@SangeetaMishr SangeetaMishr commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #550

Adds a "Use Case: Escalating unanswered AI queries to a human agent" section to the Open a ticket with a human agent doc, answering the Discord question referenced in the issue:

  1. How to add Label the incoming message in the AI fallback path so unhandled messages get labeled automatically (e.g. AI_unhandled).
  2. How to add Open a ticket with a human agent right after labeling, so those queries route to a human agent.

The walkthrough covers:

  • Capturing the contact's question, then calling the AI Assistant as usual
  • Configuring the assistant's Instructions to return one consistent fallback phrase when it can't answer
  • Using Split by a result in the flow on the assistant's response to branch on that fallback phrase (or the Other branch)
  • Labeling that branch with AI_unhandled right there - since no Wait for Response runs between the contact's original question and this point, the label still lands on the original question, not the AI's reply
  • Adding the Open a ticket with a human agent node immediately after, using the original question as the ticket body

Cross-links to the existing File Search / OpenAI Assistants doc, the Split by a Result in the Flow doc, and the Label the incoming message doc (recently expanded in #644) rather than duplicating their content.

Verification

No Glific feature returns a built-in "AI couldn't answer" signal, so the guidance relies on the org configuring a consistent fallback phrase in the assistant's Instructions and branching on it - this matches how orgs actually do this today per the linked Discord thread. The claim that the label still applies correctly a few nodes after Wait for Response (as long as no other Wait for Response intervenes) is grounded in glific/glific's add_input_labels behavior verified while writing #644 (it labels context.last_message, which is only overwritten when a new inbound message resumes the flow).

Test plan

  • Docs site renders the new section and links correctly
  • Reviewer confirms this matches the pattern recommended on Discord

Summary by CodeRabbit

  • Documentation
    • Updated the “Open a ticket with a human agent” guide with the latest revision date.
    • Added a new use case showing how unanswered AI conversations can be escalated to a human agent, including tagging the original message and opening a routed ticket with the user’s question.

…cket for AI fallback

Answers the Discord question in #550 on how to auto-label
AI-unhandled queries and escalate them to a human agent ticket.

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

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 466598c5-d603-4ffc-92d4-73736c6e7eb8

📥 Commits

Reviewing files that changed from the base of the PR and between af69d32 and 8d95830.

📒 Files selected for processing (1)
  • docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md

📝 Walkthrough

Walkthrough

This change updates a single documentation file describing the "Open a ticket with a human agent" flow action. The "Last Updated" date was changed from October 2025 to July 2026. A new use-case section was added, describing how to escalate unanswered AI assistant queries to a human agent by detecting a fallback phrase, labeling the original message, and opening a ticket using the original question as the ticket body.

Changes

Cohort / File Change Summary
docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md Updated "Last Updated" date; added new "Use Case: Escalating unanswered AI queries to a human agent" section

Sequence Diagram(s)

Not applicable — this change is a documentation-only update with no code execution flow to diagram.

Compact Metadata
Type: Documentation
Impact: Low — documentation-only change
Files changed: 1

Related Issues: None specified
Related PRs: None specified

Suggested Labels: documentation

Suggested Reviewers: None specified

Poem
A rabbit hops through docs so neat,
Changing dates with careful feet,
A fallback phrase, a ticket sent,
To human hands the query's meant,
July now marks this page complete. 🐰📄

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the new AI fallback use case and the two flow actions being combined.
Description check ✅ Passed The description is directly related to the doc update and explains the AI fallback labeling and ticket-routing workflow.
Linked Issues check ✅ Passed The change satisfies #550 by documenting how to label the fallback path and immediately open a human-agent ticket.
Out of Scope Changes check ✅ Passed The only other change is a doc metadata refresh, which is consistent with the documentation update and not out of scope.
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 4, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request July 4, 2026 12:51 Inactive
@SangeetaMishr SangeetaMishr self-assigned this Jul 4, 2026
sangeeta1911 and others added 2 commits July 4, 2026 18:30
…tion

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removing backticks around @results.<result name from step 1> left
raw angle brackets, which MDX parsed as an invalid JSX tag and
failed the build. Restore backticks around just this placeholder.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot temporarily deployed to pull request July 5, 2026 15:57 Inactive
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.

Add detailed steps on Label the incoming message & Open a ticket with a human agent

2 participants