Summary: ◀▼
You can connect action flows to Microsoft Dynamics 365 Business Central to automate workflows involving customers, sales invoices, vendors, and purchase invoices. Use actions like lookup, search, create, and update for these records. Connecting requires OAuth 2.0 authentication with a service account having proper permissions. This integration helps manage external system data directly within your workflows, improving collaboration and data accuracy.
Connecting Microsoft Dynamics 365 Business Central to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
-
Azure Tenant ID: Your Azure Active Directory Tenant ID in GUID
format.
You can find your Azure tenant ID under Azure Active Directory > Properties.
-
Company ID: Your Business Central company ID in GUID format.
You can find your Company ID by navigating to your company settings or by examining the URL when logged in to Business Central.
- Environment: Optional environment name (production or sandbox). Defaults to production if not specified.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click Microsoft Dynamics 365 Business Central.
- Click Connect.
- Follow Microsoft Dynamics 365 Business Central's prompts to authenticate and
authorize the connection.Note: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for Microsoft Dynamics 365 Business Central.
Using Microsoft Dynamics 365 Business Central actions in action flows
Looking up a customer
Use the Lookup customer action to retrieve a single customer by exact match on ID, number, email, or phone number.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Optional: |
| Output | Customer details including ID, number, display name, type, email, phone, website, address fields, currency code, balance, overdue amount, total sales, blocked status, and last modified timestamp. |
Searching for customers
Use the Search customers action to search for customers in Business Central with multiple filter criteria.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Optional: Display Name, Customer
Number, Email, Phone
Number, City,
Country
|
| Output | Array of customer objects containing ID, number, display name, type, email, phone, website, address fields, tax information, currency code, blocked status, balance, overdue amount, total sales, and last modified timestamp, plus total result count. |
Creating a customer
Use the Create customer action to add a new customer record to Business Central.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Display NameOptional:
|
| Output | Customer details including ID, number, display name, type, email, phone, website, address fields, tax information, currency code, blocked status, balance, overdue amount, total sales, and last modified timestamp. |
Updating a customer
Use the Update customer action to modify an existing customer record in Business Central.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Customer IDOptional:
|
| Output | Updated customer details including ID, number, display name, type, email, phone, website, address fields, tax information, currency code, blocked status, balance, overdue amount, total sales, and last modified timestamp. |
Looking up a sales invoice
Use the Lookup sales invoice action to retrieve a single sales invoice by exact match on ID, invoice number, customer number, or external document number.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Optional: Sales Invoice ID,
Invoice Number, Customer
Number, External Document
Number
|
| Output | Sales invoice details including ID, number, dates, customer information, billing and shipping details, currency, pricing, discount, tax amounts, totals, status, contact information, and array of line items with descriptions, quantities, prices, discounts, tax details, and amounts. |
Creating a sales invoice
Use the Create sales invoice action to create a new sales invoice in Business Central.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Optional: Customer ID, Customer
Number, Invoice Date,
Posting Date, Due
Date, External Document Number,
Customer PO Reference,
Salesperson, Currency
Code,Ship To Name,
Ship To Address Line 1, Ship To
Address Line 2, Ship To City,
Ship To State, Ship To
Country, Ship To Postal Code,
Ship To Contact, Phone
Number, Email, Line
Item Type, Line Item Number,
Line Description, Line
Quantity, Line Unit Price,
Line Discount Percent, Line Tax
Code
|
| Output | Sales invoice details including ID, number, customer information, billing and shipping details, dates, references, salesperson, status, currency, pricing, discount, tax amounts, totals, remaining amount, contact information, and array of line items with full details. |
Updating a sales invoice
Use the Update sales invoice action to modify an existing sales invoice in Business Central.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: Invoice Date,
Posting Date, Due
Date, External Document Number,
Customer PO Reference,
Salesperson, Currency
Code,Ship To Name,
Ship To Address Line 1, Ship To
Address Line 2, Ship To City,
Ship To State, Ship To
Country, Ship To Postal Code,
Ship To Contact, Phone
Number, Email,
Status, Add Line Item
Type, Add Line Item Number,
Add Line Description, Add Line
Quantity, Add Line Unit Price,
Add Line Discount Percent, Add
Line Tax Code
|
| Output | Updated sales invoice details including ID, number, customer information, billing and shipping details, dates, references, salesperson, status, currency, pricing, discount, tax amounts, totals, remaining amount, contact information, and array of line items. |
Searching for sales invoices
Use the Search sales invoices action to search for sales invoices in Business Central with filter criteria.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Optional: Invoice Number,
Customer Number, External
Document Number,
Status
|
| Output | Array of sales invoice objects containing ID, number, customer information, billing and shipping details, dates, references, salesperson, status, currency, pricing, discount, tax amounts, totals, remaining amount, contact information, and line items array, plus total result count. |
Creating a vendor
Use the Create vendor action to add a new vendor or supplier record to Business Central.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Required: Optional: |
| Output | Vendor details including ID, number, display name, email, phone, website, address fields, vendor posting group, currency code, IRS 1099 code, tax information, payment terms, payment method, blocked status, balance, and last modified timestamp. |
Creating a purchase invoice
Use the Create purchase invoice action to create a new purchase invoice for recording supplier invoices and expenses.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
Optional: |
| Output | Purchase invoice details including ID, number, invoice date, due date, vendor information, vendor invoice number, total amounts excluding tax, total tax amount, total amount including tax, status, and last modified timestamp. |