Microsoft Dynamics Business Central Cloud

Microsoft Dynamics Business Central Cloud

Microsoft Dynamics Business Central Cloud is available in the ERP hub.

Element Information Details
Provider API Documentation
  • Microsoft Dynamics Business Central Cloud API documentation
  • Dynamics 365 Business Central API 1.0 documentation
  • Authentication OAuth2
    Events Polling
    Bulk Upload:True
    Download: True
    Virtual Data Resources and Transformations Supported

    Microsoft Dynamics Business Central Cloud Element

    The Microsoft Dynamics Business Central Cloud element is available in the ERP hub.

    On this page:

    Authentication Prerequisites

    The Microsoft Dynamics Business Central Cloud element uses the OAuth 2.0 authentication workflow. Before you can authenticate an instance of the Microsoft Dynamics Business Central Cloud element, you need the following: 

    Expose webservices

    The webservices in Business Central Cloud are light weight application functionality available for external systems and users. 

    The Dynamics Business Central Cloud element is built by leveraging webservices exposed by the system. 

    To enable the webservices, after you login to your Business Central system, search for the ‘Web services’ in search on the top right corner of the application screen. This will give access to the screen. A table with a list of Web Services exposed by  the system appears. 

    The table consists of important fields like the Object Type, Object ID, Object Name, Service Name, Published and OData V4 URL.

    1. Object Type is classified three types: 
    • Query: When you try to fetch information from two or more tables from Microsoft Dynamics 365
    • Page: Specific to a page of the service (default)
    • Codeunit: To customise an existing code
    1. Object ID: A unique ID given to the web services listed.

    2. Object Name: A name assigned by the Business Central Cloud that recognises the service as an entity.

    3. Service Name: A desired name given by the administrator to expose the web service.

    4. Published column contains checkboxes that allows users to expose the web services.

    5. After providing the service name with which you would like to expose the web services, check the box in the Published column and your web services will shortly be available for access.

    6. After publishing, the OData V4 URL is generated. It is the vendor URL for the web service, it includes the service name in the URL.

    Note: Since the element is built by leveraging the webservices, for the objects to work on the element the user has to expose the webservices.

    Required Authentication Parameters

    You can authenticate an element instance using the UI or via API calls. For detailed information on how to authenticate an instance, see our related documentation:

    To authenticate an instance of the Microsoft Dynamics Business Central Cloud element, you will need the following parameters:

    Parameter Name/UI ValueAPI Value/KeyDescriptionSource

    Environment Name

    environment.name

    The unique environment name for your Business Central Cloud environment.

    1. Access BC Admin center
    2. On the left hand side, Open Environments
    3. View / Create environments.

    (Or) 

    Use the URL: https://businesscentral.dynamics.com/<companyid>/<environmentname>

    OAuth API Key

    oauth.api.key

    The API key from your registered app on your AAD (Azure Active Directory)

    Login to Azure portal

    1. Open Azure directory and go to App registrations 

    2. Click +New registration to create a new application
    3. Generate application credentials

    For more information on creating an application refer to https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app

    From the application copy the API Secret field from 

    OAuth API Secret

    oauth.api.secret

    The API secret from your registered app on your AAD (Azure Active Directory)

    Business Central Service Configuration

    service.configuration

    JSON object which represents the mapping of the Cloud Elements resources with Business Central's web services. 

    Sample Service config

    {   "ServiceName": {     "objectId": "44",     "objectName": "Sales Credit Memo",     "serviceName": "salesCreditMemos"   }

    The web services exposed are collected from discovery. You can collect it from the Business Central Service Configuration Field while creating an instance.

    tenantId

    tenantId

    Directory (tenant) ID is your default Azure Active Directory GUID.


    companyId

    companyId

    Unique ID for your company login. 

    This ID can either be retrieved via GET/companies call or from the URL on the browser which follows the structure of https://businesscentral.dynamics.com/<company ID>/admin


    Note: 

    Sample Configuration JSON

    "configuration": {
        
    "filter.response.nulls": "true",
        
    "service.configuration": "{   \"creditMemos\": {     \"objectId\": \"44\",  
       \"objectName\": \"Sales Credit Memo\", 
        \"serviceName\": \"salesCreditMemos\"   }, 
      \"customerLedgerEntries\": {     \"objectId\": \"25\", 
        \"objectName\": \"Customer Ledger Entries\", 
        \"serviceName\": \"customerLedgerEntries\"   }, 
      \"customers\": {     \"objectId\": \"21\",   
      \"objectName\": \"Customer Card\", 
        \"serviceName\": \"customers\"   },  
     \"itemAttributes\": {     \"objectId\": \"7500\",  
       \"objectName\": \"Item Attributes\",  
       \"serviceName\": \"itemAttributes\"   },  
     \"itemCategories\": {     \"objectId\": \"5492\",   
      \"objectName\": \"itemCategories\",   
      \"serviceName\": \"itemCategories\"   },  
     \"itemLedgerEntries\": {     \"objectId\": \"38\",
         \"objectName\": \"Item Ledger Entries\",  
       \"serviceName\": \"itemLedgerEntries\"   },  
     \"items\": {     \"objectId\": \"30\",     
    \"objectName\": \"Item Card\",  
       \"serviceName\": \"items\"   },  
     \"ledgerEntries\": {     \"objectId\": \"20\",   
      \"objectName\": \"General Ledger Entries\",   
      \"serviceName\": \"generalLedgerEntries\"   }, 
      \"locations\": {     \"objectId\": \"5703\", 
        \"objectName\": \"Location Card\",   
      \"serviceName\": \"locations\"   },  
     \"postedPurchaseReceiptLines\": {     \"objectId\": \"528\",  
       \"objectName\": \"Posted Purchase Receipt Lines\",     
    \"serviceName\": \"postedPurchaseReceiptLines\"   },  
     \"postedPurchaseReceipts\": {     \"objectId\": \"136\",  
       \"objectName\": \"Posted Purchase Receipt\",  
       \"serviceName\": \"postedPurchaseReceipts\"   },  
     \"purchaseOrders\": {     \"objectId\": \"50\",  
       \"objectName\": \"Purchase Order\",   
      \"serviceName\": \"purchaseOrders\"   },  
     \"salesInvoices\": {     \"objectId\": \"20012\", 
        \"objectName\": \"salesInvoices\",   
      \"serviceName\": \"salesInvoices\"   }, 
      \"salesOrders\": {     \"objectId\": \"20028\",  
       \"objectName\": \"salesOrders\",  
       \"serviceName\": \"salesOrders\"   },  
     \"taxRates\": {     \"objectId\": \"10150\", 
        \"objectName\": \"Tax Rate\",   
      \"serviceName\": \"taxRates\"   },   
    \"vendorLedgerEntries\": {     \"objectId\": \"29\", 
        \"objectName\": \"Vendor Ledger Entries\",  
       \"serviceName\": \"vendorLedgerEntries\"   },   
    \"vendors\": {     \"objectId\": \"26\",
         \"objectName\": \"Vendor Card\",  
       \"serviceName\": \"vendors\"   }, 
      \"contacts\": {     \"objectId\": \"5050\",  
       \"objectName\": \"Contact Card\",
         \"serviceName\": \"contacts\"   }, 
      \"salesQuotes\": {     \"objectId\": \"41\",  
       \"objectName\": \"Sales Quote\",    
     \"serviceName\": \"salesQuotes\"   },  
     \"shipments\": {     \"objectId\": \"7339\", 
        \"objectName\": \"Warehouse Shipments\",    
     \"serviceName\": \"WarehouseShipments\"   }, 
      \"salesReturns\": {     \"objectId\": \"6630\", 
        \"objectName\": \"Sales Return Order\",   
      \"serviceName\": \"salesReturnOrder\"   },  
     \"purchaseQuotes\": {     \"objectId\": \"49\",  
       \"objectName\": \"Purchase Quote\", 
        \"serviceName\": \"purchaseQuotes\"   },   
    \"purchaseInvoices\": {     \"objectId\": \"51\",  
       \"objectName\": \"Purchase Invoice\",   
      \"serviceName\": \"PurchaseInvoice\"   }, 
      \"accounts\": {     \"objectId\": \"16\",   
      \"objectName\": \"Chart of Accounts\",    
     \"serviceName\": \"ChartofAccounts\"   }, 
      \"apPayments\": {     \"objectId\": \"256\", 
        \"objectName\": \"Payment Journals\",   
      \"serviceName\": \"PaymentJournals\"   }, 
      \"salesOrdersLines\": {     \"objectId\": \"20028\", 
        \"objectName\": \"salesOrders\",   
      \"serviceName\": \"salesordersSalesLines\"   }, 
      \"purchaseOrdersLines\": {     \"objectId\": \"50\", 
        \"objectName\": \"Purchase Order\", 
        \"serviceName\": \"purchaseOrdersPurchLines\"   },  
     \"purchaseInvoicesLines\": {     \"objectId\": \"51\", 
        \"objectName\": \"Purchase Invoice\",  
       \"serviceName\": \"PurchaseInvoicePurchLines\"   }, 
      \"salesInvoicesLineItems\": {     \"objectId\": \"20012\", 
        \"objectName\": \"salesInvoices\",   
      \"serviceName\": \"salesInvoicessalesInvoiceLines\"   },  
     \"taxDetails\": {     \"objectId\": \"468\",   
      \"objectName\": \"Tax Details\",  
       \"serviceName\": \"taxdetails\"} }",
      
      "synchronous.bulk.notification": "true",
      
      "oauth.callback.url": "[Your callback URL]"
      }
    }'


    Element Fact Sheet and Reference

    Authentication and Configuration Parameters

    To see all authentication parameters for the Microsoft Dynamics Business Central Cloud element, follow these steps:

    1. Sign in to Cloud Elements and navigate to Elements.
    2. Hover over the card for an element, and then click My Resources. 
    3. In the top navigation toolbar, click Setup.
    4. From the Setup page, you can view a complete list of the element's authentication and configuration parameters.

    Events and Supported Resources

    The Microsoft Dynamics Business Central Cloud element supports events via webhooks. For detailed information about our Events framework and how to configure an element instance with events, see our documentation:

    You can set up polling events for the following resources of the Microsoft Dynamics Business Central Cloud element:

    • itemCategories
    • salesInvoices
    • salesOrders

    Bulk

    Bulk provides an option to upload a large number of resources, such as contacts, to a service provider all at once. You can use Bulk to download a csv or json file from a large number of records or upload a csv or json file to add multiple records.

    Queryable Endpoints

    You can use CEQL to query the following endpoints of the Microsoft Dynamics Business Central Cloud element:

    • GET /accounts
    • GET /ap-payments
    • GET /bulk/jobs
    • GET /contacts
    • GET /credit-memos
    • GET /customer-ledger-entries
    • GET /customers
    • GET /incoming-payments
    • GET /inventory-ledger-entries
    • GET /item-attributes
    • GET /item-categories
    • GET /item-ledger-entries
    • GET /items
    • GET /journal-lines
    • GET /ledger-entries
    • GET /locations
    • GET /{objectName}
    • GET /{objectName}/{objectId}/{childObjectName}
    • GET /posted-purchase-receipt-lines
    • GET /posted-purchase-receipts
    • GET /purchase-invoices
    • GET /purchase-invoices-lines
    • GET /purchase-orders
    • GET /purchase-orders-lines
    • GET /purchase-quotes
    • GET /purchase-return-orders
    • GET /sales-invoices
    • GET /sales-orders
    • GET /sales-orders-lines
    • GET /sales-quotes
    • GET /sales-returns
    • GET /shipments
    • GET /tax-rates
    • GET /transfer-orders
    • GET /vendor-ledger-entries
    • GET /vendors

    {{Snippet.termelementucsingular}} API Documentation

    Provider Documentation