Skip to main content

Celonis Product Documentation

Microsoft Dynamics 365

The Microsoft Dynamics 365 modules enable you to monitor events and create, update, search, retrieve, or delete vendor invoices and vendor invoice items in your Microsoft Dynamics 365 account.

Getting Started with Microsoft Dynamics 365

Prerequisites

The module dialog fields that are displayed in bold (in the Execution Management System scenario, not in this documentation article) are mandatory!

Connecting Microsoft Dynamics 365 to Execution Management System

To connect your Microsoft Dynamics 365 account to Integromat you need to obtain the Tenant ID from the MS Azure Portal and insert it in the Integromat Create a connection dialog together with your Host URL.

1. Log in to MS Azure Portal.

2. Navigate to the Azure Active Directory service (61f1665478fe8.png ).

61f16655795f9.gif

3. Click the Copy to Clipboard button.

61f16657c29fa.png

4. Go to the Execution Management System scenario and open the Microsoft Dynamics 365 module's Create a connection dialog. Fill the following fields:

Connection name

Enter the name for your Microsoft Dynamics 365.

Host

Enter the Host URL without trailing slash " / " and including HTTPS, e.g.: https://<example>.cloudax.dynamics.com.

Tenant ID

Enter the Tenant ID you have copied in step 3 above.

5. Click the Continue button to establish the connection.

6. After you click the Continue button, Execution Management System will redirect you to the Microsoft website where you will be prompted to log in and grant Execution Management System access to your account.

61f1665905be4.png

Confirm the dialog by clicking the Accept button.

The connection has been established. You can proceed with setting up the module.

If the Status Code Error: 401 error is displayed, the Host URL could be inserted with the trailing slash (remove the slash at the end of the URL), or there can be another mistake in the Create a connection dialog field.

61f1665a2a6e3.png
Vendor Invoices
Search Vendor Invoices

Retrieves vendor invoices by filter settings.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Type of Filter

Select whether to use an in-built simple filter or a custom filter based on the Open Data query.

Simple Filter

Select the name of the field (property) and the value you want to filter returned results by. You can build the filter query using the AND/OR operators.

Custom Filter

Enter the OData query. For more details, please see the OData documentation.

Order By

Set the sort order of the result by selecting the property and direction you want to sort the results by.

Limit

Set the maximum number of vendor invoices Execution Management System will return during one execution cycle.

Create a Vendor Invoice

Creates a new vendor invoice.

It is necessary to create a vendor invoice in order to create a vendor invoice item.

Required fields:

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Data Area ID

Select the company or enter the ID of the company that created the invoice.

Currency

Enter the currency code. Use the Search button to determine the exact currency code.

Invoice Account

Select the invoice account that is associated with the vendor for the purchase order, if the invoice is associated with a purchase order. If the invoice is not associated with a purchase order, enter the vendor account for the invoice.

Invoice Number

Enter the desired invoice number.

Get a Vendor Invoice

Retrieves post details.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Data Area ID

Enter (map) the ID of the company that created the invoice you want to retrieve details for.

Invoice Header Reference

Enter the header reference of the invoice you want to retrieve details for.

Update a Vendor Invoice

Updates an existing vendor invoice.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Data Area ID

Enter (map) the ID of the company that created the invoice you want to update.

Invoice Header Reference

Enter the header reference of the invoice you want to update.

Please find the descriptions of the fields in the Create a vendor invoice module description.

Delete a Vendor Invoice

Deletes an existing vendor invoice.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Data Area ID

Enter (map) the ID of the company that created the invoice you want to delete.

Invoice Header Reference

Enter the header reference of the invoice you want to delete.

List a Vendor Invoice Items

Retrieves items for a specified vendor invoice.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Invoice Header Reference

Enter the header reference of the invoice you want to list items for.

Limit

Set the maximum limit of vendor invoice items Execution Management System will return during one execution cycle.

Create a Vendor Invoice Item

Creates a vendor invoice item and attaches it to the specified vendor invoice.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Invoice Header Reference

Enter the header reference of the vendor invoice you want to attach the vendor invoice item to.

Item Number

Enter the item number. Ideally, the item number should be identical to the product number.

Procurement Category

Enter the name of the procurement category.

Update a Vendor Invoice Item

Updates a vendor invoice item.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Data Area ID

Enter (map) the ID of the company that created the invoice you want to update.

Invoice Header Reference

Enter the header reference of the vendor invoice that contains the vendor invoice item you want to update.

Invoice Item Line Number

Enter (map) the number of the invoice item line which you want to update.

Delete a Vendor Invoice Item

Deletes a vendor invoice item.

Connection

Establish a connection to your Microsoft Dynamics 365 account.

Data Area ID

Enter (map) the ID of the company that created the invoice containing the item you want to delete.

Invoice Header Reference

Enter the header reference of the invoice item you want to delete.

Invoice Item Line Number

Enter (map) the number of the invoice item line which you want to delete.

Generic Modules
Watch Events

Triggers when a predefined business event occurs.

The webhook URL needs to be generated in Execution Management System and then added to MS D365's integrations settings. To set up receive webhook from MS Dynamics 365, you need to follow these 5 main steps:

Generating a Webhook URL

1. Add the Watch Events module to your Execution Management System scenario.

2. Generate and copy the webhook URL.

61f1665b7a59b.gif
Creating a Key Vault

1. Log in to MS Azure Portal.

2. Navigate to Key vaults and click the Create key vault button.

61f1665dc7ecd.gif

3. On the Basics tab, select the BusinessEvents in the Resource group field, fill all required fields and click the Next: Access policy button (61f1666069163.png).

61f1666162de1.png

On the Access policy tab click the +Add Access Policy link.

61f16662b509d.png

In the Add access policy dialog, set the access policy as follows and the configuration by clicking Add button:

Configure from the template (optional)

Select the Key, Secret & Certificate Management option.

Key permissions

Select all permissions and uncheck the Decrypt option.

Secret permissions

Select all permissions.

Certificate permissions

Select all permissions.

Select principal

Select the application you have created before.

  • Proceed to the Review + create tab and click Create.

Generating Secret and Inserting the Webhook URL

1. Once the Key Vault is created, navigate to Key Vault resource > Secrets, click +Generate/Import.

61f166644c981.gif

2. Fill the following fields:

Upload option

Manual.

Name

Enter the desired name for the webhook.

Value

Enter the webhook URL you have generated in the Generating a Webhook URL section.

61f166677be4f.gif
Creating an HTTPS Endpoint

1. Log in to your Dynamics 365 Finance and Operation environment.

2. Navigate to System administration > Business events > Business events catalog.

61f166696bbca.png

3. Open the Endpoints tab and click +New.

61f1666ae0335.png

Select the HTTPS endpoint type and click Next.

Configure the new endpoint as follows:

Endpoint name

Enter the name of the endpoint.

Endpoint type

HTTPS

Azure Active Directory application ID

Enter the application ID that is created in the Azure Active Directory in the Azure portal.

61f1666be5832.gif

Azure application secret

Enter the secret value for the application. Create a new client secret under Certificates & secrets.

61f1666f3df7c.gif

Key vault DNS name

Enter the name from your Key Vault setup. You can find it in the Overview of the Key Vault you have created under the Vault URI field.

61f166725fe4b.gif

Key vault secret name

Enter the secret name for the endpoint resource you have created in Key Vault.

61f16674b5469.png
Activating Business Events

Business events in the business event catalog are not active by default. From the catalog, you can activate any business event that you want to trigger your Execution Management System Watch Events module.

1. Select the business event on the Business event catalog tab.

2. Click +Activate.

3. In the Configure new business event dialog, select the legal entity and the endpoint you have created and click OK to save the configuration.

61f1667606ba1.gif

4. Make sure that you see the event on the Active events tab.

61f1667b8b7c7.png

Now, every time the vendor invoice is posted, the Watch Events module in your Execution Management System scenario is triggered.

Make an API Call

Allows you to perform a custom API call.

Connection

Establish a connection to your Discourse account.

URL

Enter a path relative to your host URL.

For example: /data/Customers .

For the list of available endpoints, refer to the list of entities at https://<<My Instance URL>>/Metadata/DataEntities .

Method

Select the HTTP method you want to use:

GET

to retrieve information for an entry.

POST

to create a new entry.

PUT

to update/replace an existing entry.

PATCH

to make a partial entry update.

DELETE

to delete an entry.

Headers

Enter the desired request headers. You don't have to add authorization headers; we added those for you.

Query String

Enter the request query string.

Body

Enter the body content for your API call.

Example of Use - List Customers

The following API call returns all customers in your MS Dynamics 365 account:

URL :

/data/Customers

Method:

GET

61f1667c7bf00.png

The result can be found in the module's Output under Bundle > Body > value.

In our example, 9 customers were returned:

61f1667d6b2c4.png