Overview
The Process Feedback workflow is the core automation that powers intelligent feedback triaging in GTM Feedback. It uses AI agents to automatically match incoming customer feedback to existing feature requests, creating new requests when needed, and managing the human-in-the-loop approval process.Located at:
apps/www/src/workflows/process-customer-entry/index.tsPurpose
This workflow solves a critical problem in feedback management: automatically determining whether new customer feedback should be added to an existing feature request or if it represents a genuinely new request. By using semantic search and confidence scoring, it reduces manual triaging work while maintaining quality through human oversight.Trigger Conditions
The workflow is triggered when:- A user submits feedback through the web UI
- A Slack message is marked with a feedback reaction emoji
- An unprocessed feedback entry exists in Redis and needs processing
Input Parameters
Execution Steps
The workflow implements a sophisticated three-tier confidence system:Semantic Search
Uses the AI search agent to find similar feature requests based on the customer pain description.Returns matches with confidence scores (0-1) and reasoning.
Confidence Evaluation
Evaluates the top match against three confidence thresholds:
- High confidence (≥0.9): Auto-add feedback to existing request
- Medium confidence (0.8-0.9): Request human approval
- Low confidence (<0.8): Create new feature request
Why these thresholds?
Why these thresholds?
These values are tuned based on semantic similarity scores from OpenAI embeddings. A confidence of 0.9+ indicates very high semantic similarity, while 0.8-0.9 represents “probably related” cases that benefit from human judgment.
High Confidence Path (≥0.9)
Automatically adds feedback to the matched request:
- Creates feedback entry with metadata (confidence, reason, match type)
- Auto-follows the request for the submitter
- Sends confirmation DM via Slack with AI-generated message
Medium Confidence Path (0.8-0.9)
Implements human-in-the-loop approval:
- Generates approval message using AI slack agent
- Creates a workflow hook for async response
- Sends Slack DM with “Add to Existing” and “Create New” buttons
- Waits for user decision
- Processes based on approval/decline
The workflow uses durable execution, so it can wait for user input without blocking system resources. The state is persisted and resumed when the user responds.
Low Confidence Path (<0.8)
Creates a new feature request:
- Fetches all product areas for AI assignment
- Uses request creation agent to generate title, description, and area assignment
- Creates request with auto-generated slug
- Stores vector embedding for future searches
- Creates feedback entry linked to new request
Code Example
Here’s how to invoke the workflow:Workflow Steps Reference
The workflow uses several reusable steps defined in/process-customer-entry/steps.ts:
searchRequestsStep
searchRequestsStep
Purpose: Find semantically similar feature requestsImplementation: Calls the semantic search AI agent with the customer pain descriptionReturns: Array of matches with confidence scores and reasoning
createRequestStep
createRequestStep
Purpose: Create a new feature request using AIImplementation:
- Uses request creation agent to generate title, description, and area assignment
- Creates database record with auto-generated slug
- Stores vector embedding for future semantic searches
apps/www/src/workflows/process-customer-entry/steps.ts:53generateSlackMessageStep
generateSlackMessageStep
Purpose: Generate contextual Slack messages using AITypes:
high_confidence_match: Confirmation for auto-added feedbackapproval_request: Human-in-the-loop approval promptdm_notification: Final notification with request URL
apps/www/src/workflows/process-customer-entry/steps.ts:107sendFeedbackMatchApprovalDm
sendFeedbackMatchApprovalDm
Purpose: Send interactive approval request to SlackImplementation:
- Creates Slack message with action buttons
- Includes workflow hook token for callback
- Returns message timestamp for later updates
apps/www/src/workflows/process-customer-entry/steps.ts:131deleteUnprocessedFeedbackStep
deleteUnprocessedFeedbackStep
Purpose: Clean up temporary feedback from RedisImplementation: Deletes Redis key after successful processingLocation:
apps/www/src/workflows/process-customer-entry/steps.ts:10Configuration
Environment Variables
Confidence Thresholds
Adjust these constants in the workflow file:Error Handling
The workflow includes comprehensive error handling:Related
Semantic Search Agent
Learn how semantic matching works
Request Creator Agent
Understand AI-powered request generation
Workflows Concept
Deep dive into workflow architecture
Slack Integration
Configure Slack feedback collection