DocuSign Multi-Party Routing Orchestration
For complex agreements, the flow orchestrates multi-party DocuSign routing - sequential and parallel signers, conditional recipients based on contract value, and CC observers - driven by a routing definition, with status tracking and exception handling. Automates sophisticated signing workflows beyond a single template.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow orchestrates sophisticated multi-party DocuSign routing for complex agreements. A new Agreement Request row in Dataverse drives the build of a routed envelope: two sequential signers, a value-based conditional CFO/Finance approver, and an optional CC observer - all from a definition-driven set of fields and environment variables. Status is written back to the row and a summary is posted to Teams, with a try/catch exception path that escalates failures.
Why it matters: real agreements often need branching, value-based, multi-stage routing that a single static template cannot express. A definition-driven orchestrator handles it cleanly and portably.
Ships Off (demo).
Use Case
Legal/Ops needs dynamic signer routing that adapts to each agreement's parties and value: standard signers always sign in order; a Finance/CFO approver is added automatically only when the contract value exceeds a configured threshold; an optional observer is copied (CC) without being asked to sign.
Flow Architecture
When a New Agreement Request Is Created
Dataverse - SubscribeWebhookTriggerFires on Create of flowlibs_agreementrequests (organization scope); the row carries signers, contract value, and an optional CC observer.
Initialize Trace, Config & Plan
Initialize variableMints a guid() correlation id, binds the DocuSign account/template, CFO name/email, value thresholds, Teams channels, parses the CFO threshold and contract value, and builds a human-readable routing plan.
Build & Route Envelope (try)
ScopeCreates a draft envelope from the template, adds Signer 1 (order 1) and Signer 2 (order 2), conditionally adds the CFO approver above the value threshold (order 3), conditionally adds a CC observer (order 4), then sends the draft.
Write Back & Notify
Dataverse - UpdateRecord + TeamsWrites the envelope id, status Sent for Signature, correlation id, and routing plan back to the row, and posts the plan to the legal/ops channel.
Exception Path (catch)
Scope (runs on failure)Marks the agreement row Routing Exception with the correlation id and escalates to the exception channel for human intervention.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_DocuSignAccountId | String | 00000000-0000-0000-0000-000000000000 | DocuSign account ID used on every DocuSign action. |
| flowlibs_DocuSignTemplateId | String | 00000000-0000-0000-0000-000000000000 | GUID of the base agreement DocuSign template. |
| flowlibs_CfoSignerName | String | Finance Approver | Display name of the conditional high-value approver. |
| flowlibs_CfoSignerEmail | String | cfo@yourcompany.com | Email of the conditional high-value approver. |
| flowlibs_ValueThresholds | String | {"cfo":50000} | JSON map of value-based routing rules. |
| flowlibs_RoutingDefTable | String | flowlibs_agreementrequests | Entity set name of the agreement-request table. |
| flowlibs_ExceptionChannelId | String | <your-channel-id> | Teams channel for routing exceptions / declines. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams group (team) ID for notifications. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel for routing summaries. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| DocuSign | shared_docusign | CreateEnvelopeFromTemplateNoRecipients AddRecipientToEnvelope SendDraftEnvelope |
| Microsoft Dataverse | shared_commondataserviceforapps | SubscribeWebhookTrigger UpdateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Parallel signers
- Give two recipients the same routing order to make them sign in parallel instead of sequentially.
- More value tiers
- Extend flowlibs_ValueThresholds (e.g. {cfo:50000, legal:250000}) and add another conditional AddRecipientToEnvelope keyed on the new threshold.
- Witness / notary
- Add roles with additional AddRecipientToEnvelope calls at higher routing orders.
- Fallback signer on decline
- Add a DocuSign status-change child flow that reroutes when a recipient declines.
- Forms front end
- Point the trigger at a Forms response (written into the agreement table) for self-service intake.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Value-based conditional
True when the contract exceeds the CFO threshold.
EXPR.02Parse threshold
Reads the CFO value rule from the JSON map.
EXPR.03CC observer present
True when a CC observer email is supplied.
EXPR.04Envelope id hand-off
The draft envelope id used by the AddRecipient calls.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.