Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.docpipe.ai/llms.txt

Use this file to discover all available pages before exploring further.

DocPipe writes to Microsoft Dynamics 365 Business Central via the HTTP action and callback output nodes. Both authenticate through a Business Central connector, which supplies the OAuth bearer token and the API base URL so your node only types the relative path. There are two write patterns. Pick the simpler one when it applies.

1. Connect

  1. Open Settings → Connectors and create a connector of type Business Central.
  2. Sign in with the Microsoft account that has access to the BC environment.
  3. Choose the environment (Production or your sandbox name) and tenant.
  4. Save. The connector now exposes a base URL like https://api.businesscentral.dynamics.com/v2.0/{tenantId} and injects the bearer token on every request.
In any HTTP action or callback node, select this connector and your URL field becomes a relative path. A deep insert is a single POST to a parent entity whose body contains its OData navigation children inline. BC creates the parent and all children atomically. Use it when you want to create one parent (sales quote, sales order, sales invoice, purchase invoice, …) along with its lines in one call. HTTP action configuration
FieldValue
ConnectorYour Business Central connector
MethodPOST
URL/production/api/v2.0/companies({companyId})/salesQuotes
Body FormatJSON
BodyThe JSON below
{
  "customerId": "5608c139-9029-f111-9f24-7ced8dad939a",
  "documentDate": "2026-04-28",
  "externalDocumentNumber": "EXT-QUOTE-001",
  "salesQuoteLines": [
    {
      "lineType": "Item",
      "lineObjectNumber": "1896-S",
      "description": "First item",
      "quantity": 2,
      "unitPrice": 150
    },
    {
      "lineType": "Item",
      "lineObjectNumber": "1896-S",
      "description": "Second item",
      "quantity": 1,
      "unitPrice": 300
    }
  ]
}
Common parent / child pairs that support deep insert:
  • salesQuotessalesQuoteLines
  • salesOrderssalesOrderLines
  • salesInvoicessalesInvoiceLines
  • purchaseInvoicespurchaseInvoiceLines
If your scenario fits this shape, stop here. Deep insert is simpler, faster, and easier to debug than $batch.

3. When deep insert isn’t enough — use $batch

Deep insert only handles “one parent and its immediate children, all created together.” Use OData $batch when you need any of:
  • Mix methods in one round-trip transaction (POST + PATCH + DELETE).
  • Cross-entity transactions across unrelated parents (e.g. create a customer and a vendor in one transaction).
  • Bulk creation across many parents in a single HTTP call (50 quotes in one request rather than 50 requests).
  • Coordinate separate endpoints in one transaction, such as creating a quote and an order together.
Business Central’s $batch does not implement OData v4 $<contentId> URL references between operations. Each operation must specify its full target path. For “create parent A, then attach child to A’s new id,” use deep insert (children nested in the parent body) instead.
Instead of asking you to handcraft the Business Central JSON batch payload, DocPipe accepts a structured JSON description of the operations and packages it into a $batch request with Isolation: snapshot on the server. HTTP action configuration
FieldValue
ConnectorYour Business Central connector
MethodPOST
URL/production/api/v2.0/$batch
Body FormatOData Batch
BodyThe JSON below
{
  "companyId": "11111111-2222-3333-4444-555555555555",
  "operations": [
    {
      "contentId": "quote",
      "method": "POST",
      "url": "salesQuotes",
      "body": {
        "customerId": "5608c139-9029-f111-9f24-7ced8dad939a",
        "documentDate": "2026-04-28",
        "externalDocumentNumber": "EXT-QUOTE-001",
        "salesQuoteLines": [
          { "lineType": "Item", "lineObjectNumber": "1896-S", "quantity": 2, "unitPrice": 150 },
          { "lineType": "Item", "lineObjectNumber": "1896-S", "quantity": 1, "unitPrice": 300 }
        ]
      }
    },
    {
      "contentId": "order",
      "method": "POST",
      "url": "salesOrders",
      "body": {
        "customerId": "5608c139-9029-f111-9f24-7ced8dad939a",
        "externalDocumentNumber": "EXT-ORDER-001"
      }
    }
  ]
}

Body shape

FieldRequiredDescription
companyIdnoBusiness Central company GUID. When set, every operation url is automatically prefixed with companies(<companyId>)/. Operations whose url starts with /, companies(, or $ keep their original URL (escape hatch for absolute paths and $<contentId> references).
operationsyesArray of write operations to run in one transaction.

Operation shape

FieldRequiredDescription
methodyesOne of POST, PUT, PATCH, DELETE. GET is not allowed in batch write mode.
urlyesRelative URL under /api/v2.0. With companyId set at the top, write salesQuotes; without it, write the full companies({companyId})/salesQuotes.
contentIdnoA string id used by later operations as $<contentId>. Auto-assigned 1, 2, … when omitted.
headersnoPer-operation headers (e.g. If-Match: * for PATCH). The inner Content-Type is managed by the server.
bodynoThe operation’s JSON body.
The body editor validates the shape live: missing fields, unknown keys, and wrong methods are flagged inline as you type.

Templating

The whole body is a string passed through DocPipe’s template engine, so you can build the operations array dynamically from upstream node output, e.g. {{aggregator.payload.operations}}.

4. Notes & limits

  • One transaction per request. DocPipe sends Isolation: snapshot, so the operations run in one Business Central transaction when the invoked APIs do not force their own commit.
  • Response is JSON. BC replies with a responses array containing one inner response per operation.
  • Connector base URL is required. The Business Central connector enforces a list of allowed hosts; absolute URLs are rejected for safety.
  • Parent plus children. Put child collections like salesQuoteLines inside the parent salesQuotes body. Use extra batch operations for separate endpoints like salesOrders.