# CRM integration settings

Use this page to review and save branch-level CRM choices and synchronization rules.
A customer relationship management (CRM) integration controls whether a branch uses a CRM and
which sales orders, purchase orders, invoices, commission invoices, and products synchronize
between PAMS and the CRM.

## CRM integration settings

CRM integration settings determine the selected CRM, the direction of synchronization, and when
each supported record is issued. The settings area contains one expandable panel for each branch.

The page opens with branch panels collapsed. Open a branch before choosing an integration. A
selected CRM reveals the synchronization matrix; **No integration** leaves the matrix hidden.

| If you need to… | Go to |
|---|---|
| Return to the wider configuration area | [Configuration home](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-home) |
| Review sales-order work affected by synchronization | [Orders](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/orders) |
| Continue with purchase-order work | [Purchase job record](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/purchase-job-record) |
| Continue with invoice work | [Invoice lifecycle](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/invoice-lifecycle) |
| Continue with product work | [Products](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/products) |

## Before you start

Before changing a branch, have the following ready:

| What you need | Why it matters |
|---|---|
| A subscription that includes the CRM integration settings | Without the subscription, the page shows the subscription-upgrade surface instead of the settings surface. |
| Edit access to the settings | Edit access determines whether **Save** and **Save and Close** are available. |
| The branch you intend to change | The settings belong to the branch whose panel you open. Opening another branch closes the previously open panel. |
| Your CRM choice and synchronization policy | The choice determines whether the synchronization matrix appears, and the create selections determine which update and timing options appear. |

No field on this page is marked required. The page does not provide
text-entry fields for external CRM credentials or a connection test.

## Find and open a branch

A branch panel is the expandable area that contains one branch's CRM choice and synchronization
settings.

**Prerequisites**

- Open the **Integration with CRMs** settings page.
- Know which branch you want to review.

**Steps**

1. Locate the branch by its displayed branch heading.
2. Select the branch heading or its expand control.

   ![Branch headings with the settings panels collapsed](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/b1b1cc28af692adad71b44f05c1c12a4.png)

The selected panel opens. Opening another branch closes the currently open panel, so the visible
settings belong to the open branch.

**Result:** The selected branch's CRM settings are open.

## Review and configure synchronization workflows

Synchronization settings describe when PAMS sends records to the CRM and when the CRM sends
records to PAMS. The page uses **Pams >> CRM** and **Pams << CRM** for those directions.

> **Note:** The synchronization matrix appears only for a branch with an integration selected.

**Prerequisites**

- Open the branch panel you want to configure.

**Steps**

1. Review the CRM choices: **No integration**, **Odoo**, **Sugar**, **Sales force**,
   **M.s. dynamics**, and **SAP**.
2. Select the CRM that the branch uses.

   ![CRM choices in the open branch settings](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/d21b3550e7b5b0b554727ef4d375c506.png)

3. Review the applicable workflow choices in the matrix.

   | Workflow | Create and update choices | Issue timing choices |
   |---|---|---|
   | Sales orders | **Synchronize when create new sales order**; **Synchronize when update sales order** | **Automatically when sales order is draft**; **Automatically when sales order is valid**; **Automatically when sales order is delivered** |
    | Purchase orders | **Synchronize when create new purchase order**; **Synchronize when update purchase order** | **Automatically when PO is draft**; **Automatically when PO is valid**; **Automatically when PO is received** |
    | Sales invoices | **Synchronize when create new sales invoice** | **Automatically when invoice is draft**; **Automatically when invoice is due**; **Automatically when invoice is paid** |
   | Commission invoices | The commission-invoice create and update choices | **Automatically when invoice is draft**; **Automatically when invoice is due**; **Automatically when invoice is paid** |
   | Products | **Synchronize when create new product**; **Synchronize when update product** | Not applicable |
   | Booking | The visible workflow choices | The visible issue timing choices |

   ![Synchronization matrix after a CRM is selected](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/aecf4919e129184b9976e96d45982eda.png)

Update and issue-timing choices appear for a workflow after at least one create direction for that
workflow is selected. The matrix uses **Pams >> CRM** and **Pams << CRM** as its two directions.

**Result:** The branch shows its CRM choice and the applicable direction, create, update, and timing choices.

## Handle configuration branches

Each branch has one of three visible settings states:

| Branch state | What you see | What to do |
|---|---|---|
| No integration | **No integration** is selected and the synchronization matrix is absent. | Select a CRM when this branch must synchronize with one. |
| Enabled integration | A CRM such as **Odoo**, **Sugar**, **Sales force**, **M.s. dynamics**, or **SAP** is selected and the matrix is visible. | Review the two synchronization directions and the applicable workflows. |
| Create selection made | A workflow's update choices and issue-timing choices are revealed after a create direction is selected. | Review the newly visible choices before saving. |

![Branch showing No integration without the synchronization matrix](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/e18dd72b1ae6b422c663086e50bf8a8e.png)

The timing choice **Don't integrate** is not available in the mounted workflow choices. Leave a
workflow's create directions unselected when that workflow should not expose its update and timing
choices.

## Save or leave settings

Saving commits the choices for the open branch. Leaving with unsaved changes opens a decision
prompt instead of silently discarding them.

**Prerequisites**

- Open the branch whose settings you reviewed or changed.

**Steps**

1. Select the action that matches what you want to do.

   | If you want to… | Select |
   |---|---|
   | Save and remain on the settings page | **Save** |
    | Save and close the settings surface | **Save and Close** |
    | Leave without saving | The X in the upper-right corner of the open settings panel. |

2. If the prompt asks `Do you want to save your changes?`, select the required outcome.

   | If you choose | Outcome |
   |---|---|
   | **Save** | The changes are saved before you leave. |
   | **Don't Save** | The unsaved changes are discarded and you leave without saving. |

After a successful save, the page displays `Your company work procedure settings has been saved successfully`.

**Result:** The branch settings are saved, saved and closed, discarded after your confirmation, or
left at their previously saved values.

## When settings do not save

Use the table below to match what you see with the supported action for this page.

| What you see | What it means | What to do |
|---|---|---|
| `An error occurred while processing your request` while the page is loading | The settings request did not complete. | Check that the branch page is available, then open the branch again. |
| `Server Error` after selecting **Save** or **Save and Close** | The save request returned an error. | Select **Save** or **Save and Close** again. |
| The synchronization matrix is absent | The branch has **No integration** selected, or the selected CRM has not been applied to the open branch. | Review the integration choice. The matrix appears only when a CRM other than **No integration** is selected. |
| Update or timing choices are absent for a workflow | No create direction is selected for that workflow. | Select a create direction for the workflow, then review the choices that appear. |
| **Save** or **Save and Close** is unavailable | The page is not in an editable state for your access. | Ask an administrator with edit access to make the change. |

The settings page does not provide a CRM connection test. The message `An error occurred while
connecting to your CRM system.` belongs to a CRM connection or synchronization action page, not
to this settings page.

## What to do next

After saving, continue in the work area that matches the synchronization choices you configured.
Use [Orders](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/orders) for sales-order work, [Purchase job record](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/purchase-job-record) for
purchase-order work, [Invoice lifecycle](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/invoice-lifecycle) for invoices, and [Products](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/products)
for product work. Return to [Configuration home](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-home) when you need another
administrative setting.
