Stripe Checkout to Fulfillment Pipeline
When a Stripe Checkout session completes, the flow validates the order, reserves inventory in Dataverse, creates a fulfillment/shipping task, sends the customer an order-confirmation, and posts to an ops channel. Connects Stripe Checkout to an end-to-end fulfillment process.
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 connects Stripe payments to an end-to-end fulfillment process in Microsoft Dataverse. When a new Stripe charge is created (a completed Checkout payment), the flow validates that the charge is paid and succeeded, reserves stock on the matching inventory item, creates a fulfillment order, alerts the operations team in Microsoft Teams, and emails the customer an order confirmation via Outlook.
Why it matters: A paid order has to become a fulfilled order. Automating the handoff from Stripe to inventory and fulfillment prevents missed shipments, double-selling, and manual re-keying — and gives ops a single Teams feed of every new order, backorder, and unpaid-charge exception.
Status: Built API-first. Ships Off (demo). Going live requires only authorizing the four connections and setting the environment-variable values.
Use Case
An e-commerce / operations team takes payments through Stripe Checkout and wants each completed payment to automatically reserve inventory, open a fulfillment task, notify the ops channel, and confirm with the customer — with out-of-stock and unpaid charges surfaced as exceptions rather than silently dropped.
Flow Architecture
When a new Stripe charge is created
Stripe — OnNewCharge (batch poll, splitOn)Fires per new Stripe charge (a completed Checkout payment).
Initialize Correlation Id
Initialize Variableguid() traceability id stamped on the order and every message.
Initialize Reserve Sku / Quantity
Initialize VariableSKU and units to reserve, from environment variables.
Initialize Ops Group / Channel Id
Initialize VariableTeams team and channel ids for the ops notification.
Compose Order Amount
ComposeConvert the Stripe amount from cents to a major-unit decimal.
Check If Charge Succeeded
ConditionOnly fulfill charges where status = succeeded AND paid = true.
List Inventory For SKU
Microsoft Dataverse — ListRecordsFind the inventory item for the configured SKU.
Check If Stock Available
ConditionDecide reserve vs backorder (available >= reserve quantity).
Update Inventory Reservation
Microsoft Dataverse — UpdateRecordDecrement Quantity Available, increment Quantity Reserved.
Create Reserved Fulfillment Order
Microsoft Dataverse — CreateRecordFulfillment order marked Reserved.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_OpsTeamsGroupId | String | <your-team-id> | Teams team/group id of the operations channel. |
| flowlibs_OpsTeamsChannelId | String | <your-channel-id> | Teams channel id of the operations channel. |
| flowlibs_DefaultReserveSku | String | SKU-DEMO-001 | Inventory SKU to reserve per charge (the Stripe Charge object carries no line items, so a configured SKU is used in this demo). |
| flowlibs_ReserveQuantity | String | 1 | Units to reserve per order (converted with int()). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Stripe | shared_stripe | OnNewCharge |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords UpdateRecord CreateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 |
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.
- Real SKU mapping
- The Stripe Charge object has no line items. To reserve the actually-purchased products, add a Stripe GetCheckoutSession / line-items HTTP call (Stripe REST) keyed on the charge, then loop inventory per line item instead of the single flowlibs_DefaultReserveSku.
- Carrier integration
- After Create Reserved Fulfillment Order, call a shipping connector to create a label and write the tracking number back to the order.
- Idempotency
- Add a ListRecords on flowlibs_fulfillmentorders filtered by flowlibs_stripechargeid before creating, to survive trigger re-fires (Stripe webhook retries).
- Digital goods
- Branch on product type to deliver a license/download instead of reserving physical stock.
- Fraud hold
- Gate fulfillment on outcome/risk_level (already surfaced in the ops card) — e.g. require approval when risk is elevated or highest.
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.01Amount cents to decimal
Convert the Stripe amount from cents to a major-unit decimal.
EXPR.02Charge epoch to DateTime
Convert the Stripe epoch timestamp to an ISO datetime.
EXPR.03Stock check
Reserve only when available stock meets the requested quantity.
EXPR.04Decrement available
New on-hand quantity after reservation.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.