Skip to main content
Skip table of contents

Workflow Patterns

Given the expansive capabilities of the Business Central platform and the robust nature of Square 9’s no-code interface provided with GlobalAutomation, the are many ways to solve all sorts of business problems. Use these examples to help understand the flow of actions and how to sequence them.

Getting Lists

Having current lists of vendors, account codes, and other accounting related list elements from the ERP is critical for bidirectional data flows. Each object must be retrieved separately. Depending on the number of objects that need synchronization, and the schedule at which that synchronization needs to happen, retrieving lists from Business Central may be done in one or more workflows.

NOTE: When using the CRON Import node, any saved workflow may have ONLY one import node on the design surface. If you need to set multiple schedules for different objects, a different workflow must be used.

Steps

  1. Use the Dynamics 365 node to pull an objects data into a table field.

    1. The response body for all requests is automatically mapped to fields with matching names in the table. Ensure your table fields are setup to retrieve the data or interest by inspecting the documented response objects from Microsoft’s documentation.

  2. Use the List Update node to set the list values from the previous step. This will result in rows of data from the table being used to update or set lists in GlobalCapture. You may overwrite or append to lists, but the GlobalCapture API will prevent insertion of duplicates in either case.

WARNING: If you perform numerous list updates in a single step, be sure to check the “Clear Table Field Before Request” option. This will ensure data from a previous request in the flow is not included with list data from the current request.

List updates should be scheduled to execute at a time when document indexing operations are not actively running.

Creating Invoices

Purchase Invoices (AP Invoices) are a common transaction from GlobalCapture to Business Central. Creating a purchase invoice may take many forms and might involve multiple steps, depending on the needs of the customer.

Steps - Header Only

If you wish to push only invoice header data:

  1. Ensure the document in GlobalCapture has been reviewed and include all required data points that match expected input for Business Central.

    1. In most cases, at a minimum, a vendor will be specified in GlobalCapture. To push an invoice and assign its vendor, you will need the vendor’s ID as data available in the GlobalCapture process.

    2. Use lists to ensure data in GlobalCapture matches the expected data points in Business Central.

  2. Use the Dynamics 365 node to target the purchaseinvoices endpoint in Business Central.

    1. When a Purchase Invoice is created, it’s internal ID will be returned in the response from Business Central. That ID will be automatically mapped to a process field named id if one is present in the workflow. This ID will be necessary for other actions you may wish to make on the invoice.

Steps - Header and Amount

If you wish new Purchase Invoices to include amounts, especially for expense based invoices, it’s common to pass a single line to the transaction.

  1. Follow the Header Only steps outlined above.

  2. Use the Dynamics 365 node to target the purchaseinvoicelines endpoint in Business Central.

    1. Per the Business Central documentation, you will notice the lines request is tied to the purchaseinvoice request: purchaseInvoices({p_id})/purchaseInvoiceLines

    2. The “{p_id}” portion of the request outlined above is Square 9 notation, and will automatically inject the ID value of the invoice created in the Header Only section above.

    3. The request body may include an amount from the header fields, or from a line in a table field. Use Square 9 Notation to map the data points needed in Business Central.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.