Connect Microsoft Dynamics 365 to Neblex CPQ
Why teams connect Microsoft Dynamics 365 and Neblex CPQ
A quote gets approved in Neblex CPQ, and then somebody rebuilds it in Dynamics 365: the account if it is new, the sales order and each of its lines, and for a configured product, the parts list operations needs. Every rekeyed line is a chance to get a product or quantity wrong, and every hour before order entry is an hour the customer waits. Once the order exists, the quote and the order drift apart, and sales has to ask whether it was fulfilled or invoiced.
Neblex CPQ does not ship a Dynamics 365 connector of its own, and it does not push webhooks. It publishes an ordered event feed that an outside system pulls and acknowledges, and it exposes an API for reading quotes, line items, bills of materials, and customers. Neblex Integration Fabric supplies the other half: a Dynamics 365 connector with 160 operations, seven polled triggers for changes in Dynamics, and the flow that maps one side to the other. Fabric owns the connection, the field map, the retries, and the run history.
The result: an approved quote becomes a Dynamics 365 account, a sales order with lines, and bill of materials rows per configured line, on a schedule as short as every minute, with the order number and status back on the quote.
How it works
Three parts: the Neblex CPQ API and event feed, the Fabric Dynamics 365 connector, and a flow in between.
On the Neblex CPQ side. You create a service account in your environment, issue it a service token, and enable only the scopes the flow needs: read and update on the QUOTE module, read and update on the CUSTOMER module, and read and update on INTEGRATIONS for the event feed. An event listener on that service account subscribes to the event types the flow needs: QUOTE_STATUS_CHANGED, QUOTE_APPROVED, QUOTE_VERSION_CREATED, CUSTOMER_CREATED, CUSTOMER_UPDATED, CUSTOMER_ADDRESS_CREATED, and CUSTOMER_ADDRESS_UPDATED. The listener's fetch endpoint returns ordered stream events and coalesced pending events, which hold only the latest state of a record edited several times. The flow acknowledges what it processed, and an event is delivered at least once until it is acknowledged.
On the Dynamics 365 side. The Fabric connector signs in with OAuth 2.0 to the Dynamics 365 web API and works with standard and custom tables. The quote-to-order flow uses Upsert by alternate key, Update an order, Create a row, Get an order, and Search, out of 160 operations. Changes in Dynamics reach the flow through seven polled triggers: Account created or changed, Contact created or changed, Opportunity created or changed, Row created, Row updated, Lead created, and Case created, firing on the schedule you set. The connector's operations do not describe their output fields in advance, so you confirm the field map with Test this step when you build the flow.
The flow in between. A Fabric flow polls the CPQ listener, keeps the events it wants, reads the full quote through the API, resolves the account, pauses for a person where you ask it to, writes the Dynamics records, writes the order number back to the quote, and acknowledges the events. Matt, the Neblex AI Assistant, can explain which CPQ fields and events to use and propose flow changes for you to apply; it never saves, publishes, or runs a flow.
Worked example: an approved quote for a configured conveyor becomes a Dynamics 365 sales order
The product is a configured conveyor section with a bill of materials produced by CPQ rules.
- The quote is approved. It moves to the stage you treat as approved, and CPQ writes a QUOTE_STATUS_CHANGED event to the listener's queue with quoteId, quoteNumber, fromStatus, toStatus, and updatedAt.
- The flow polls. On the schedule you set, every minute or longer, it fetches the next batch from the listener, reads the stream events in order, and keeps those whose toStatus is your approved stage.
- The flow reads the quote. Get a quote returns the header (quoteNumber, quoteName, revision, currency, totalPrice, custCustomerId, custBillToId, custShipToId) and the line items. Hydrate customer references returns the linked customer, addresses, and terms. For every line where isConfigured is true, Get the resolved BOM returns the configBom rows.
- The account is resolved. Upsert by alternate key runs on the account table, keyed on a column you add to hold the CPQ Customer id, with name, website, and the bill_to CustomerAddress as the primary address. An existing account is updated; a missing one is created.
- A person checks the big ones. If totalPrice is above your threshold, or the account is new, a Wait for form step sends an approval task by email link. On reject, it stops and records the reason.
- The sales order and its lines are written. Upsert by alternate key runs on the salesorder table, keyed on a column holding the quote id plus revision, with the account as the customer, quoteName as the order name, and the quote currency; then it runs once per QuoteLineItem on salesorderdetail, keyed on the quote line. A line whose partNumber matches a Dynamics product references it; any other line is a write-in product with the CPQ description. Each line carries quantity and netPrice as the price per unit, marked as an override so Dynamics does not reprice.
- The bill of materials is written. For each configured line, Create a row runs once per configBom row of type Component or Assembly, into the table your Dynamics environment uses for bills of materials, carrying partNumber, quantity, lineNumber, and parentLineNumber so the indented structure survives. Pricing rows in configBom are skipped; price is carried on the order line.
- Status comes back. The flow advances the quote to an ordered stage with Advance the quote to a new stage, or, while the quote is still editable, writes the Dynamics order number to a quote custom field with Update a quote; a quote locked at a snapshot status refuses edits. It then acknowledges the events. A second flow uses Row updated on the sales order table to update the quote as it moves to fulfilled or invoiced.
Field mapping
The starting map for the quote-to-sales-order step. It is configured in the flow, so every field, including custom columns, can be changed.
| Neblex CPQ field | Dynamics 365 table and column | Notes |
|---|---|---|
| Customer.id | account, a custom column with an alternate key | Match key. Creates the account if missing. |
| Customer.name | account.name | Display name on the account. |
| CustomerAddress.line1, city, state, zip, country | account.address1_line1, address1_city, address1_stateorprovince, address1_postalcode, address1_country | The bill_to row becomes address 1. |
| Quote.id + Quote.revision | salesorder, a custom column with an alternate key | Idempotency key. A retry updates the existing order. |
| Quote.quoteName | salesorder.name | The Dynamics order number is assigned by Dynamics. |
| Quote.currency | salesorder.transactioncurrencyid | Looked up by ISO code; the currency must exist in your Dynamics environment. |
| QuoteLineItem.partNumber | salesorderdetail.productid, or a write-in product | Matched on the Dynamics product number; customPartNumber wins when set. |
| QuoteLineItem.quantity | salesorderdetail.quantity | Line level. |
| QuoteLineItem.netPrice | salesorderdetail.priceperunit | Price override, so the Dynamics price list does not restate the quoted price. |
What syncs, each direction
Neblex CPQ to Dynamics 365
- Approved quotes become sales orders with lines, one per approved quote revision
- Configured lines become bill of materials rows in the table you choose
- New and changed customers, from CUSTOMER_CREATED and CUSTOMER_UPDATED, are upserted as accounts
- Address changes, from CUSTOMER_ADDRESS_CREATED and CUSTOMER_ADDRESS_UPDATED, update the account address
Dynamics 365 to Neblex CPQ
- The sales order number and status, written to a custom field on the quote or reflected as a stage change
- Fulfillment and invoice status, from Row updated on the sales order and invoice tables
- Account changes, from Account created or changed when Dynamics is the system of record, written with Update a customer
Governance and audit
- Scoped service account. The flow authenticates as a named service account, not a person. Its token starts with every scope off, and you enable only what the flow uses. Disabling the account revokes its tokens.
- Certificate and network checks. Every call presents a client certificate issued from your settings, and you can refuse calls from any source IP not on your approved list.
- Event acknowledgment. Events stay queued until acknowledged, so a crash mid-batch means the events come back on the next fetch, not a lost order. Coalesced events carry a version, and one that changed after it was fetched is counted as stale and delivered again.
- Approvals in the flow. A Wait for form step can hold the flow for a person: orders above a value, or first orders for a new account.
- Run history. Every run is a step-by-step record with input and output. A failed run stops at the failed step and can be replayed from there.
- Audit log. Service account calls appear in the CPQ audit log under the account's name, and each token shows a last-used timestamp.
Frequently asked questions
Does Neblex CPQ push events to Dynamics 365?
No. CPQ has no push webhooks. It queues events for a listener, and the Fabric flow fetches them on the schedule you set and acknowledges what it processed.
Which Dynamics 365 apps does this work with?
Any app that exposes its tables through the Dynamics 365 web API: the standard sales tables (account, contact, product, salesorder, salesorderdetail, invoice) and any custom table. If your bill of materials is not exposed there, the flow writes it to a custom table instead.
How are duplicate orders prevented?
The sales order is keyed on a column holding the CPQ quote id plus revision, and the account on a column holding the CPQ customer id, both alternate keys. A retry after a failure updates the record that already exists rather than creating a second one.
What happens when a quote is revised after the order exists?
CPQ writes QUOTE_VERSION_CREATED and QUOTE_STATUS_CHANGED events for the new revision. The flow decides, by the rule you set, whether to update the open order or create a new one; the key includes the revision.
Can cost and margin leak into Dynamics 365?
Only if you allow it. Cost and list price keys on line items and configBom rows are removed from API responses when the service token's field permissions do not include viewing them.
Connectors used
Microsoft Dynamics 365
ERP & Enterprise Systems
- Operations
- 160
- Operations with typed output
- 0%
- Change triggers
- 7 (poll)
- Signs in with
- OAuth 2.0 sign-in
Neblex CPQ
ERP & Enterprise Systems
- Operations
- 286
- Operations with typed output
- 100%
- Change triggers
- Poll or inbound webhook
- Signs in with
- API token
Microsoft Dynamics 365 does not describe its output fields in advance, so check the field mapping with Test this step when you build the flow.
Bring one real product
Bring one approved quote and a Dynamics 365 sandbox, and we will build the account, sales order, and bill of materials flow with you in one session, with the run history open.