# Set up mapping fields in FastStats

## Mapping the fields

To map Microsoft Dynamics fields in FastStats:

1. From **FastStats**, select **File** \> **Tools** \> **Administrative Functions** \> **Setup Microsoft Dynamics Fields**.
2. The **Setup Microsoft Dynamics Fields** dialogue opens. Select **Add New Microsoft Dynamics Field**.
3. Enter the **Microsoft Dynamics Table Name**.
4. Enter the **Microsoft Dynamics Field Name**. This is the logical name of your column.
5. Select **Select** to choose the FastStats Unique Reference Number (URN) variable **Person URN** from the list under the **People Table**, then select **OK**.
6. Select **Codes or Descriptions** (depending on your variable) from the **Output Style** dropdown.
7. Select the **Key Field** check box to define this as the primary key field.

   > **Note**
   >
   > There must be one key field, or the upload won't work.
8. Select **OK**.
9. Repeat steps 2 to 8 for all the fields you created in Dynamics 365:

   - Map `new_fstitle` with FastStats **Title**: select **Descriptions**.
   - Map `new_fsinitial` with FastStats **Initial**: select **Descriptions**.
   - Map `new_fssurname` with FastStats **Surname**: select **Descriptions**.
   - Map `new_fsdob` with FastStats **DOB**: select **Descriptions**.
   - Map `new_fsemail` with FastStats **Email Address**: select **Descriptions**.
10. Select **Close** to finish mapping fields.

## Editing or deleting mappings

You can update or delete existing Microsoft Dynamics mapping fields:

- To update a mapping field, select **Edit**.
- To delete a mapping field, select **Delete**.

> [!NOTE]
>
> You need to exit FastStats and log in again for these changes to take effect.

See [Upsert to Dynamics 365 from FastStats](<https://help.apteco.com/en/admin/integration/microsoft-dynamics-365/upsert/index.md>).
