Add Sales Lead Qualifier V2 - #25
Open
Pulkit Bhagat (pulkit-bhagat) wants to merge 4 commits into
Open
Pulkit Bhagat (pulkit-bhagat) wants to merge 4 commits into
Pulkit Bhagat (pulkit-bhagat) wants to merge 4 commits into
Conversation
Pulkit Bhagat (pulkit-bhagat)
marked this pull request as ready for review
September 21, 2026 09:05
…Dataverse MCP server, sanitize PII - Lead Agent's inline tools replaced with the Dataverse MCP server tool (agent-inline connector calls hit a known platform reliability issue, tracked via an internal incident) - Add a new row is now a plain connector step feeding a dedicated Notifier agent, which sends the Hot-lead email notification after the record is created - Refined Notifier email-body instructions: reworded the deep-link intro line and moved the High-importance setting after the body description - Sanitized mailbox (sales@contoso.com) and notify address (salesteam@contoso.com) placeholders
|
Pulkit Bhagat (@pulkit-bhagat) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
added 2 commits
September 23, 2026 22:27
… display-name collision Workflow display name changed from 'Sales Lead Qualifier' to 'Sales Lead Qualifier V2' (Name attribute, JsonFileName, LocalizedName, internal JSON name, and file renamed) to avoid a naming collision with any V1 workflow of the same display name, consistent with the same fix applied to Invoice Processing V2. Sanitized PII (mailbox/notify address placeholders).
This branch has not been deployed
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.
Adds a new Copilot Studio gallery submission: Sales Lead Qualifier V2.
What it does
Watches a shared sales mailbox, qualifies inbound enquiries with BANT (Budget, Authority, Need, Timing), and logs qualified leads to a dedicated Sales Lead V2 Dataverse table, with a High-importance email alert to the sales team for Hot leads.
Architecture
ShouldLog/ShouldNotify, and produces every Sales Lead V2 field plus the alert email's subject/body. Does not touch Dataverse or Outlook directly.ShouldLogdecision.ShouldNotify, builds a deep link to the record it just created from that step's own@odata.idresponse (no separate environment-URL configuration needed), and sends one High-importance alert.Why Dataverse runs as plain steps, not agent tools
Invoking Dataverse's List rows/Add a new row as Copilot Studio agent tools currently fails on every tested environment and tenant with
400: Invalid organization URL- a platform-level issue in how that connector resolves the caller's org for agent-tool invocations. The identical actions succeed immediately as plain flow connector steps, which is why this template's Dataverse write runs as a plain node gated by a single If/Else.Why a dedicated table instead of the native Lead entity
Logs to its own Sales Lead V2 table rather than native Dataverse
Lead. The classification fields are plain text columns here, not picklists - native Lead's equivalents are option sets with environment-specific integer codes that can drift across environments. Plain text avoids that entirely: the agent writes the tier name directly, nothing to remap on import.Notes
TriggerMailboxandNotifyEmailare placeholder values (sales@contoso.com,salesteam@contoso.com) - swap for your own before publishing....selected environmentaction variant.npm run import:submissions,npm test,npm run check, andnpm run build(all passing), plus extensive live testing across Hot/Warm/Cold/Filtered tiers, required-field edge cases (blank and single-word contact names), and prompt-injection resistance (tier-forcing, notification-redirect, and config-leak attempts all correctly defeated).