# CRM integration settings

Use these settings to choose a CRM integration for each company branch and control which
sales orders, purchase orders, invoices, commission invoices, and products synchronize.

## CRM integration settings

The **Integration with CRMs** page holds one set of integration choices and synchronization
rules for each company branch. A company branch is the branch-level area where you review and
maintain those CRM choices. The workflow table lists the directions and rows that control
synchronization. Open a branch to review its current choices, then save any changes before
leaving the page.

| If you need to… | Go to |
| --- | --- |
| Identify the page and its location | [Find and open a branch](#find-and-open-a-branch) |
| Review the available integrations and workflow rows | [Review and configure synchronization workflows](#review-and-configure-synchronization-workflows) |
| Understand why rows or choices differ | [Handle configuration branches](#handle-configuration-branches) |
| Save changes or leave without saving | [Save or leave settings](#save-or-leave-settings) |
| Resolve a loading or saving problem | [When settings do not save](#when-settings-do-not-save) |
| Return to the configuration entry area | [Configuration home](configuration-home.md) |
| Maintain the company branches used by this page | [Company branches](configuration-company-branchs-view.md) |

The page opens at `/configuration/integration-crms`. Its main choice is between **No
integration** and the available CRM choices. When an integration other than **No
integration** is selected, the page also shows the synchronization directions **Pams >> CRM**
and **Pams << CRM**.

## Before you start

The settings apply to a company branch, so decide which branch you need before changing a
choice. The page can show an upgrade surface instead of the settings when the subscription
does not include this feature. Editing controls also depend on your access, and leaving with
unsaved changes opens a save-before-leaving dialog.

| Check before you begin | What you need to know |
| --- | --- |
| Subscription | The settings page is available when the subscription includes the feature. |
| Branch | The page loads company integration data and lists the company branches. |
| Access | **Save** and **Save and Close** are available when editing is allowed. |
| Unsaved changes | The X icon in the page header uses a save-before-leaving flow when changes exist. |

## Find and open a branch

The page lists five expandable branch rows; the workflow table appears after you open a branch.

Prerequisites

- You are on `/configuration/integration-crms`.

Steps

1. Identify the company branch row you need.
2. Select the branch header or its expand control.
3. Review the integration choices in the opened branch panel.

![Identify a company branch and the integration choices](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/92d0fd4a7a749e4306b022efb864c50c.png)

**Result:** The selected branch panel is open, and its integration choices are visible. Continue
to review and configure the synchronization workflows.

## Review and configure synchronization workflows

The workflow table describes when information moves between Pams and the selected CRM. Its
rows cover booking, purchasing, invoices, commission invoices, and products.

| Workflow area | Fields and choices |
| --- | --- |
| Integration | **No integration**, **Odoo**, **Sugar**, **Sales force**, **M.s. dynamics**, **SAP** |
| Direction | **Pams >> CRM**; **Pams << CRM** |
| Booking | **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** |
| Purchasing | **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 invoice | **Synchronize when create new sales invoice**; **Synchronize when update sales invoic**; **Automatically when invoice is draft**; **Automatically when invoice is due**; **Automatically when invoice is paid** |
| Commission invoice | **Synchronize when create new sales invoice**; **Synchronize when update sales invoic**; **Automatically when invoice is draft**; **Automatically when invoice is due**; **Automatically when invoice is paid** |
| Product | **Synchronize when create new product**; **Synchronize when update product** |

Prerequisites

- You have opened the branch whose settings you want to review.

Steps

1. Select the CRM choice for the branch.

   | If you need to… | Select |
   | --- | --- |
   | Leave the branch without a CRM integration | **No integration** |
   | Configure the available CRM integration | **Odoo** |

2. Read the workflow headings **Pams >> CRM** and **Pams << CRM** to distinguish the two
   synchronization directions.
3. Select a create-synchronization checkbox for the workflow you want to configure.
4. Review the update and timing rows that appear for that workflow.

![Choose the integration for an open branch](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/e2004dd14a81dbab2394cb88416a9410.png)

![Review the synchronization directions and workflow rows](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/826f38df9d0ea377abf6111f79aa2572.png)

**Result:** The branch shows the synchronization rows for the selected integration and the
workflow choices in the workflow table for the selected create-synchronization checkbox.
Continue to handle any differences in the choices or visible rows.

## Handle configuration branches

The page changes its visible choices according to the subscription, the selected integration,
and the create-synchronization choices. Use the branch that matches what you need to do.

| If… | Then… |
| --- | --- |
| The subscription does not include the feature | The page shows the subscription-upgrade surface instead of the settings. |
| You need no CRM integration | Select **No integration**. The workflow table is not shown for this choice. |
| You need the available CRM integration | Select **Odoo**. The workflow table shows the two synchronization directions. |
| You see **Sugar**, **Sales force**, **M.s. dynamics**, or **SAP** | These choices are shown as unavailable on the settings form. |
| You select a create-synchronization checkbox | The corresponding update and timing rows become available in the workflow group. |

There is no separate workflow-exclusion option. Select **No integration** when you need no CRM
integration.

Prerequisites

- You have opened a branch panel.

Steps

1. Choose the branch that matches your intended configuration.

   | If you want to… | Use this choice or condition |
   | --- | --- |
   | Keep CRM synchronization off | **No integration** |
   | Configure the available CRM | **Odoo** |
   | Configure dependent workflow rows | Select a create-synchronization checkbox first |

2. Review which workflow rows appear after your choice.

![Review the workflow rows after a synchronization choice](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/a5373d2201413695f15c8049fcd8c087.png)

**Result:** The branch shows the controls associated with the selected integration and
synchronization path. Continue to save or leave the settings.

## Save or leave settings

Use **Save** to keep the page open after saving, or use **Save and Close** to save and leave
the page. If you select the X icon in the page header while changes exist, choose what to do in the
save-before-leaving dialog.

Prerequisites

- You have reviewed or changed the settings in an open branch.

Steps

1. Choose the action that matches what you need to do.

   | If you need to… | Select |
   | --- | --- |
   | Save the settings and remain on the page | **Save** |
   | Save the settings and leave the page | **Save and Close** |
   | Leave the page after reviewing or changing settings | The X icon in the page header |

2. If you selected the X icon in the page header while changes exist, choose one option in the
   save-before-leaving dialog.

   | If you need to… | Select |
   | --- | --- |
   | Return to the settings without leaving | **Cancel** |
   | Leave without keeping the changes | **Don't Save** |
   | Save the changes before leaving | **Save** |

![Choose how to save the settings](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/a5373d2201413695f15c8049fcd8c087.png)

![Choose what to do with unsaved changes](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/47e8711fa134ec6e45b9c88eff037e07.png)

| Message class | Message | When it appears |
| --- | --- | --- |
| Success | `Your company work procedure settings has been saved successfully` | After a successful save |

**Result:** The settings are saved, or the leave dialog has applied the option you selected.
If a saving problem appears, continue to When settings do not save.

## When settings do not save

Use the exact message on screen to identify the type of interruption. The page can report a
load error or a server error while its settings are being processed.

| Message | What to do |
| --- | --- |
| `An error occurred while processing your request` | Review the page state and try the operation again. |
| `Server Error` | Check the settings you changed and try the save operation again. |
| A choice remains unavailable | Use the choices that are available on the form. |

After resolving a saving problem, continue to What to do next.

## What to do next

After reviewing the branch settings, verify the page state by checking the selected integration,
the visible workflow rows, and the save controls. If you changed a setting, use **Save** or
**Save and Close** before moving on. For branch maintenance, continue to [Company branches](configuration-company-branchs-view.md).

Prerequisites

- You have finished reviewing the settings for the branch.

Steps

1. Check the selected integration choice.
2. Check the workflow rows visible for that choice.
3. Select **Save** or **Save and Close** if you changed a setting.

**Result:** The branch settings remain on screen with the selected integration and workflow
rows, or the page has left after the save action.
