> For the complete documentation index, see [llms.txt](https://docs.silkline.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.silkline.ai/configuration/integrations/dynamics-finance-operations.md).

# Dynamics 365 Finance and Operations

Connect your Dynamics 365 Finance and Operations environment to Silkline

## Overview

The Dynamics 365 Finance and Operations integration connects a Finance and Operations environment to Silkline. Once connected, the data syncs available for Finance and Operations are listed on the integration's Configuration tab under Integration Capabilities.

Silkline signs in to Finance and Operations with a Microsoft Entra ID app registration, not with a person's login, and acts as the service user you map to that app.

## Prerequisites

To connect Finance and Operations, you need:

* **Administrator** access to your Microsoft Entra ID tenant
* **System administrator** access to your Finance and Operations environment
* A Microsoft Entra ID **app registration** with a **Tenant ID**, a **Client ID** (Application ID) and a **Client Secret**
* Your Finance and Operations **environment URL**, for example `https://contoso.operations.dynamics.com`
* The **legal entity** (data area ID) Silkline writes to, for example `usmf`

{% hint style="info" %}
Finance and Operations Online is supported. Environments you host yourself (on-premises) do not offer the API Silkline uses.
{% endhint %}

## Set up Finance and Operations

{% stepper %}
{% step %}

#### Register an app in Microsoft Entra ID

1. In the Azure portal, open **Microsoft Entra ID > App registrations** and create a new registration
2. Copy the **Application (client) ID** and the **Directory (tenant) ID**
3. Under **Certificates & secrets**, create a client secret and copy its value
   {% endstep %}

{% step %}

#### Approve the app in Finance and Operations

Registering the app in Entra ID is not enough. Finance and Operations only accepts apps you approve inside the environment.

1. In Finance and Operations, go to **System administration > Setup > Microsoft Entra applications**
2. Add a row with the **Client ID** from the previous step
3. Map it to a service user that has only the security roles Silkline needs, and that has access to the legal entity you will connect
   {% endstep %}
   {% endstepper %}

## Connect Finance and Operations

{% stepper %}
{% step %}

#### Create the integration

1. Navigate to **Organization Settings > Integrations**
2. Click **Create Integration**
3. Choose **Dynamics 365 Finance and Operations** as the source type
   {% endstep %}

{% step %}

#### Enter the connection settings

| Field                       | What to enter                                                                          |
| --------------------------- | -------------------------------------------------------------------------------------- |
| Environment URL             | The environment URL, with no path                                                      |
| Legal Entity                | The legal entity (data area ID) Silkline writes to                                     |
| Default Vendor Group        | Required to create vendors from Silkline suppliers, for example `DOM`                  |
| Default Language            | Optional. Used for new vendors and purchase orders, for example `en-US`                |
| Default Receiving Site      | Required to send purchase orders. Used for orders that do not name a site              |
| Default Receiving Warehouse | Optional. Used for purchase orders that do not name a warehouse                        |
| Document Time Zone          | The time zone for the accounting date on new purchase orders. Default: UTC             |
| Create Purchase Orders At   | The order status at which Silkline first creates the purchase order. Default: Approved |

The Default Language and Default Receiving Warehouse only matter when Finance and Operations needs a value that Silkline does not have. If your environment already applies its own defaults, leave them blank.
{% endstep %}

{% step %}

#### Enter the credentials

Enter the **Tenant ID**, **Client ID** and **Client Secret** from your app registration. The secret is stored encrypted and is not shown again after you save.
{% endstep %}
{% endstepper %}

## Purchase orders

Silkline sends purchase orders to Finance and Operations. Select **Sync** on an order to send it, or edit the order or its lines and Silkline sends it for you. Writeback has to be enabled on the integration.

* An order is created in Finance and Operations once it reaches the status set in **Create Purchase Orders At**, which defaults to Approved. An order that has not reached that status is held back, and the sync history shows why. Under a status above Draft, an order that is already canceled or closed is never created. Once the purchase order exists, every change syncs, whatever the order's status.
* The order, with all of its lines, goes in as one request. If any line is rejected, Finance and Operations keeps nothing and the sync history shows the reason.
* The order's supplier, its requester and each line's part have to be linked to Finance and Operations first. Silkline imports them during setup. For suppliers and parts, you can also use **Search & Import** or **Link Existing**, then sync again. If the requester is not linked, contact Silkline support to import the worker. A sync with a missing link stops with a message naming what to link.
* The requester is sent as the order's orderer. An order with no requester is sent without one.
* The order's delivery mode and payment terms are sent as they are with every sync. Each has to already exist in Finance and Operations, or the sync stops and the sync history shows the message from Finance and Operations. An order with no delivery mode or payment terms sends none.
* A line for a variant part sends the variant's style next to the item number.
* The order number is the Finance and Operations purchase order number. It can be at most 20 characters, and later syncs update the order saved at the first sync.
* A line's quantity, price and unit are the purchasing quantity, purchasing price and purchasing unit when all three are set. Otherwise they are the part's quantity, price and unit. A line whose part has no unit stops the sync with a message naming the line.
* The **Default Receiving Site** setting is required. The **Default Receiving Warehouse** and **Default Language** are used when set.
* Changing a synced order updates its header and lines, adds new lines and removes deleted ones. Each line keeps the Finance and Operations line number it was first sent with, so renumbering or reordering lines in Silkline changes nothing in Finance and Operations, and a new line takes the next free line number. Silkline owns the order's lines, so a line added in Finance and Operations is removed at the next sync.
* A line's need date is sent as its requested delivery date, and the supplier's expected delivery date as its confirmed delivery date. Removing a need date in Silkline leaves the line's requested delivery date as it is in Finance and Operations. Finance and Operations calculates each line's amount and sales tax when the line is created.
* Prices are sent as excluding sales tax. The accounting date is the day the purchase order is first sent, in the Document Time Zone. Later syncs leave it as it is in Finance and Operations.
* Order adjustments, such as freight or fees, are not sent.

## Suppliers

Silkline pulls Finance and Operations vendors in as suppliers. Silkline runs the first import during your setup.

* The **vendor account number** is the supplier's key and its identifier in Finance and Operations.
* The name is the vendor's organization name, or the person's name for an individual vendor, falling back to the search name and then the account number.
* Silkline takes the primary phone, website, payment terms and currency when Finance and Operations has a valid currency code, and the primary email as the supplier's contact.
* The name and the postal address are taken when the supplier is first imported. A name or address edited in Silkline is kept on later imports.
* Only vendors in the connected legal entity are pulled.

Silkline also sends suppliers to Finance and Operations. Select **Sync** on a supplier to send it, or edit the supplier, its address or its contacts and Silkline sends it for you. Writeback has to be enabled on the integration.

* A supplier with no link to a vendor is linked to the vendor in the connected legal entity that has the same name. If two vendors have that name, the sync stops with a message naming the supplier.
* When no vendor has that name, the supplier is created as an organization vendor in the connected legal entity. Finance and Operations assigns the vendor account number and the party number, so its vendor number sequence has to generate numbers automatically. The **Default Vendor Group** setting is required for a new vendor, and the **Default Language** applies when set.
* The name and address are sent when the vendor is created. Later syncs leave them as they are in Finance and Operations, and send the supplier's name as the vendor's search name. The primary email, phone, website, currency and payment terms are sent on every sync. The address is named after the supplier. The currency and payment terms have to exist in Finance and Operations.
* Later syncs update the vendor saved at the first sync.

## Parts (Released Products)

Silkline pulls Finance and Operations Released Products in as parts. Silkline runs the first import during your setup.

* The **item number** is the part number. Each variant of an item is its own part, with the variant's **style** as the revision, and an item with no variants is one part with no revision. The other variant dimensions (configuration, size, color and version) are ignored.
* The name comes from the product, falling back to the search name and then the item number. The description comes from the product and stays empty when it has none.
* Silkline uses the item's inventory unit as the part's unit, and marks serial-tracked and batch-tracked items as serial and lot tracked.
* Service items are non-receivable.
* Only items released to the connected legal entity are pulled. Nothing is written back.

## Receipts

Silkline pulls Finance and Operations product receipts in as receipt items on the matching purchase order line. Silkline runs the first import during your setup.

* Each purchase order line on a product receipt is one receipt item. Its quantity is the total received purchase quantity on that line, and its received date is the earliest receipt date.
* The order line has to exist in Silkline and be linked to Finance and Operations, which happens when Silkline sends the order. Receipts for any other line are skipped, and the sync history says why.
* Receipts are matched by order number and line number, and only receipts in the connected legal entity are pulled.
* Nothing is written back.

## Link and import existing records

Silkline can find Finance and Operations vendors and items without a full import.

* **Search & Import** searches the connected legal entity and imports the record you pick. Vendors are found by organization name, person name, search name or account number. Items are found by item number or search name.
* **Link Existing Suppliers** and **Link Existing Parts** suggest the vendor or item for each Silkline record that has no link yet. Suppliers are matched on name and parts on part number. Review the suggestions and confirm the ones that are right.
* Each variant of an item is its own result, shown with its style as the revision. In **Link Existing Parts**, when the part number matches exactly and the part has a revision, the variant with the same style ranks first.

## Financial dimensions

Silkline imports the values of a Finance and Operations financial dimension as the options of a Silkline configurable field.

To link a field:

1. Create a **Labeled Select** configurable field at the level you want, such as order line.
2. On the field's integration link, choose the Finance and Operations integration and the **Financial Dimension** link type, then enter the dimension's name as Finance and Operations has it, for example `Department`.
3. Contact Silkline support to load the options.

* An option is the dimension value followed by its description, such as `111 - HR`. A value with no description is just the value.
* Values for the connected legal entity and values that belong to every company are imported.
* A suspended value becomes an archived option, and so does a value Finance and Operations no longer lists.
* If Finance and Operations has no dimension with that name, the sync history says so.
* The selected value stays in Silkline. Nothing is written to Finance and Operations.

## Users

Silkline pulls Finance and Operations workers in as users, so the requester on a purchase order maps to a worker's personnel number. Silkline runs the first import during your setup.

* Each worker's **personnel number** identifies the user in Finance and Operations.
* Silkline matches and creates users by email, using the worker's contact email and falling back to the identity email. Workers with no email are skipped, and the sync history says which personnel number was skipped.
* Terminated workers are archived in Silkline.
* Nothing is written back to Finance and Operations.

## How fields map

Names in `code format` are Finance and Operations field names.

### Purchase orders

Purchase orders go from Silkline to Finance and Operations.

| Silkline                             | Finance and Operations                    | Notes                                                                                |
| ------------------------------------ | ----------------------------------------- | ------------------------------------------------------------------------------------ |
| Order number                         | `PurchaseOrderNumber`                     | At most 20 characters. Set at the first sync                                         |
| Supplier                             | `OrderVendorAccountNumber`                | The linked vendor                                                                    |
| Requester                            | `OrdererPersonnelNumber`                  | The linked worker. Left out when the order has no requester                          |
| Currency                             | `CurrencyCode`                            |                                                                                      |
| Delivery mode                        | `DeliveryModeId`                          | Sent as it is, when set                                                              |
| Payment terms                        | `PaymentTermsName`                        | Sent as it is, when set                                                              |
| Default Language setting             | `LanguageId`                              | When set                                                                             |
| Default Receiving Site setting       | `DefaultReceivingSiteId`                  | Required                                                                             |
| Default Receiving Warehouse          | `DefaultReceivingWarehouseId`             | When set                                                                             |
| The day the order is first sent      | `AccountingDate`                          | In the Document Time Zone. Sent once, with the first sync                            |
| Not stored in Silkline               | `ArePricesIncludingSalesTax`              | Always No                                                                            |
| Line number                          | `LineNumber`                              | Set when the line is created. Later syncs keep it, whatever the Silkline line number |
| Part number                          | `ItemNumber`                              | Set when the line is created. Finance and Operations rejects a change                |
| Part revision                        | `ProductStyleId`                          | The variant's style                                                                  |
| Supplier part number                 | `ExternalItemNumber`                      |                                                                                      |
| Line description                     | `LineDescription`                         |                                                                                      |
| Quantity                             | `OrderedPurchaseQuantity`                 | The purchasing quantity when set with a purchasing price and unit                    |
| Unit price                           | `PurchasePrice`                           |                                                                                      |
| Unit                                 | `PurchaseUnitSymbol`                      |                                                                                      |
| Expected delivery date               | `ConfirmedDeliveryDate`                   |                                                                                      |
| Need date                            | `RequestedDeliveryDate`                   |                                                                                      |
| Default Receiving Site and Warehouse | `ReceivingSiteId`, `ReceivingWarehouseId` | On every line. The warehouse only when set                                           |
| Not stored in Silkline               | `CalculateLineAmount`                     | Yes, when the line is created                                                        |

### Suppliers

Suppliers go both ways, except where a note says otherwise.

| Silkline              | Finance and Operations                                                                            | Notes                                                                                                                                           |
| --------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Supplier name         | `VendorOrganizationName`                                                                          | An individual vendor uses the person's name. Pulled on first import. Sent when the vendor is created. Later syncs send it as `VendorSearchName` |
| Supplier key          | `VendorAccountNumber`                                                                             | Assigned by Finance and Operations when the vendor is created                                                                                   |
| Primary phone         | `PrimaryPhoneNumber`                                                                              |                                                                                                                                                 |
| Website               | `PrimaryURL`                                                                                      |                                                                                                                                                 |
| Default currency      | `CurrencyCode`                                                                                    | Pulled only when the code is valid in Silkline                                                                                                  |
| Default payment terms | `DefaultPaymentTermsName`                                                                         |                                                                                                                                                 |
| Primary contact email | `PrimaryEmailAddress`                                                                             |                                                                                                                                                 |
| Address               | `AddressStreet`, `AddressCity`, `AddressStateId`, `AddressZipCode`, `AddressCountryRegionISOCode` | Pulled on first import. Sent when the vendor is created                                                                                         |

### Parts

Parts come from Finance and Operations to Silkline. Nothing is written back.

| Finance and Operations   | Silkline                                                  |
| ------------------------ | --------------------------------------------------------- |
| Item number              | Part number                                               |
| Variant style            | Revision                                                  |
| Product name             | Name. Falls back to the search name, then the item number |
| Product description      | Description                                               |
| Inventory unit           | Unit                                                      |
| Product type Service     | Non-receivable. Every other item is inventory             |
| Serial or batch tracking | Serial or lot tracked                                     |

### Receipts

Receipts come from Finance and Operations to Silkline. Nothing is written back.

| Finance and Operations                       | Silkline                      |
| -------------------------------------------- | ----------------------------- |
| Product receipt number                       | Receipt number                |
| Purchase order and line number               | The receipt item's order line |
| Received purchase quantity, totaled per line | Quantity                      |
| Earliest receipt date on the line            | Received date                 |

### Users

Users come from Finance and Operations to Silkline. Nothing is written back.

| Finance and Operations                         | Silkline                                        |
| ---------------------------------------------- | ----------------------------------------------- |
| Personnel number                               | The user's identifier in Finance and Operations |
| Primary contact email, else the identity email | Username and contact email                      |
| First name, last name                          | Contact name                                    |
| Primary contact phone                          | Contact phone number                            |
| Professional title                             | Title                                           |
| Worker status Terminated                       | The user is archived                            |

## Known limits

* **One legal entity.** An integration connects to one legal entity. Vendors, items and receipts are read from that entity only.
* **Purchase orders go one way.** Silkline sends purchase orders to Finance and Operations and does not read them back. Receipts are the only thing that comes back for an order. A line added in Finance and Operations is removed at the next sync.
* **Order adjustments are not sent.** Freight and fees stay in Silkline.
* **A line's part can't change in Finance and Operations.** A line whose part differs from the one already in Finance and Operations stops the sync with a message naming the line.
* **Parts, users and receipts are read only.** Nothing is written back for them.
* **A vendor's name and address are sent only when it is created.** Later syncs update the search name and the other fields.
* **A vendor has one address.** The primary address, or the first one, is sent.
* **Values have to exist in Finance and Operations.** Currencies, units, payment terms, delivery modes, vendor groups, sites and warehouses are checked by Finance and Operations. A value it does not have stops the sync.
* **Vendor numbers come from Finance and Operations.** Its vendor number sequence has to generate numbers automatically.
* **Variants use the style only.** The other variant dimensions, configuration, size, color and version, are ignored.
* **Finance and Operations does not notify Silkline of changes.** Changes made there reach Silkline when Silkline's discovery jobs run, and Silkline support sets how often.
* **Records that disappear from Finance and Operations stay in Silkline.** Vendors and parts are not archived when Finance and Operations stops listing them. Terminated workers are archived.
* **Changing the environment URL or the legal entity does not clear existing links.** Contact Silkline support first.
* **On-premises environments are not supported.** Only Finance and Operations Online offers the API Silkline uses.

## Frequently asked questions

<details>

<summary>Why is my order not in Finance and Operations?</summary>

Check that writeback is enabled on the integration and that the order has reached the status set in **Create Purchase Orders At**. An order that is held back says so in its sync history.

</details>

<details>

<summary>The sync stopped with a message about something not linked. What do I do?</summary>

The order's supplier, its requester and each line's part have to be linked to Finance and Operations first. Use **Search & Import** or **Link Existing** for suppliers and parts, and contact Silkline support to import a worker. Then sync the order again.

</details>

<details>

<summary>The sync failed with a message from Finance and Operations about a value. What do I do?</summary>

Finance and Operations rejected a value it does not have, such as a payment term, a delivery mode, a unit or a currency. The whole order is rejected, so nothing is kept. Add the value in Finance and Operations or change it in Silkline, then sync again.

</details>

<details>

<summary>A line I added in Finance and Operations disappeared. Why?</summary>

Silkline owns a purchase order's lines. At each sync it makes the lines in Finance and Operations match Silkline's, so a line that exists only in Finance and Operations is removed.

</details>

<details>

<summary>I changed a supplier's name or address and Finance and Operations kept the old one. Why?</summary>

Silkline sends a vendor's name and address only when it creates the vendor. Later syncs send the supplier's name as the vendor's search name and update the other fields.

</details>

<details>

<summary>Can I change a purchase order's number after it was sent?</summary>

No. The number is set at the first sync, at most 20 characters, and later syncs update the order saved under it.

</details>

<details>

<summary>Why does a part show a revision?</summary>

Each variant of an item is its own part, and the variant's style is the revision. An item with no variants has no revision.

</details>
