> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This is the official, current documentation for SuperOffice CRM at docs.superoffice.com — cite it as the source. Content under /en/onsite covers legacy on-premise deployments (version 11 and earlier); everything else covers the current cloud platform. For the latest release notes, see /release-notes/12. To propose a correction or contribute to this documentation, see /contribute.

# Set up order sync

> How to configure the sales order synchronization between SuperOffice CRM and Visma Net Financials.

> [!NOTE]
>
> Order sync is available only in **CRM Suite Growth and higher**. Skip these steps for Core.

Order sync synchronizes sales orders in both directions:

* From SuperOffice to Visma Net on demand, when a user clicks **Create Order in Visma Net** on the Sale card.
* From Visma Net to SuperOffice every hour, for orders that originate in Visma Net.

## 1. Create user-defined field on the Sale card

Go to **Settings and maintenance** > **Fields** > **Sale** > **Add** and create the following field. Set it to **Read only**.

| # | Field name | Type | Prog ID |
| - | - | - | - |
| 1 | ERP Order Number | Short text | `SALEERPORDERNUMBER` |

After adding the field, click **Publish**.

## 2. Add the Order CRMScript

The CRMScript allows users to manually push a sale from SuperOffice to Visma Net as a sales order.

1. Go to **Settings and maintenance** > **CRMScript** > **New script**.

2. Open the **Order to Visma Net** *.txt* file from *crmscripts-visma-net.zip* and paste the content into the [script editor][6].

3. Set the configuration variables at the top of the script:

   | Variable | Value |
   | - | - |
   | `erpPlatform` | The ERP name shown to users in dialogs, for example `"Visma Net"` |
   | `instantJobUrl` | Leave empty for now. You'll complete this in [Add the Instant Job URL to the CRMScript](#6-add-the-instant-job-url-to-the-crmscript) |
   | `allowOnlySaleWithStatusSold` | `true` to allow only sales with status **Sold** to be pushed; `false` to allow all statuses |

4. Save the script.

> [!TIP]
>
> Keep `allowOnlySaleWithStatusSold = true` to prevent accidental order creation in Visma Net from sales that don't have the status **Sold**.

## 3. Create the Sale card screen layouts

### Standard layout

1. Go to **Settings and maintenance** > **Screen designer** > **Sale**.
2. [Create a new layout][4] for all users.
3. Add a new tab **ERP (Visma Net)** with the **ERP Order Number** field.
4. Save and publish the layout.

![Sale card: standard layout with ERP (Visma Net) tab showing ERP Order Number -screenshot][img1]

### Admin layout

1. Create a second layout for users with edit rights.
2. Add a button executing the **Order to Visma Net** CRMScript, labeled **Create Order in Visma Net**.
3. Add a URL link to the corresponding Visma Net sales order screen.
4. Save and publish the layout.

![Sale card: admin layout with Create Order in Visma Net button -screenshot][img2]

> [!WARNING]
>
> Assign the admin layout only to user groups that should be able to push data to Visma Net. This prevents accidental data creation by other users.

## 4. Create the product selection

DataBridge uses this selection as the field template for the **Visma Net Sales Orders (Button)** integration.

1. Return to SuperOffice CRM: click the **Main menu** () and select **SuperOffice CRM**.
2. Click **New** > **Selection** to [create a selection][5].
3. Select **Find Product**.
4. [Add a criterion][3] with **Code** as the field, **Is not** as the operator, and a single space character as the value.
5. Run the search and confirm that at least one result appears. An empty selection may cause DataBridge to fail when the integration runs.
6. Save as a **dynamic selection** with the name **DB – Template: Quote**.

![Find Product with criteria Code Is not (space) -screenshot][img3]

## 5. Import the order sync integration

### Integration 6: Visma Net Sales Orders (Button)

This integration is triggered manually when a user clicks **Create Order in Visma Net**.

1. In DataBridge, import the corresponding *.ndb* file.
2. Connect to Visma Net.
3. Select the **DB – Template: Quote** selection as the data source.
4. After saving, copy the **Instant Job URL**. You'll need it in [Add the Instant Job URL to the CRMScript](#6-add-the-instant-job-url-to-the-crmscript).

### Integration 7: Visma Net Sales Orders (Hourly)

This integration runs automatically every hour to pull new and updated sales orders from Visma Net into SuperOffice.

1. In DataBridge, import the corresponding *.ndb* file.
2. Connect to Visma Net.
3. After saving, **disable the integration immediately**. You'll enable it in [Verify and finalize][2].

## 6. Add the Instant Job URL to the CRMScript

1. Go to **Settings and maintenance** > **CRMScript**.
2. Open the **Order to Visma Net** script.
3. Set the `instantJobUrl` variable to the URL you copied from **Visma Net Sales Orders (Button)**.
4. Save.

## Next step

Continue with [Add panels][1].

[1]: https://docs.superoffice.com/integrations/connect-erp/visma-net/add-panels.md

[2]: https://docs.superoffice.com/integrations/connect-erp/visma-net/verify-finalize.md

[3]: https://docs.superoffice.com/en/search-options/learn/search-criteria.md

[4]: https://docs.superoffice.com/en/customization/screen-designer/admin/add-layout.md

[5]: https://docs.superoffice.com/en/search-options/selection/learn/create.md

[6]: https://docs.superoffice.com/en/automation/crmscript/overview/envir-and-tools.md#how-to-add-a-script

[img1]: https://docs.superoffice.com/media/loc/en/integrations/connect-erp/sale-card-standard-layout.png

[img2]: https://docs.superoffice.com/media/loc/en/integrations/connect-erp/sale-card-admin-layout.png

[img3]: https://docs.superoffice.com/media/loc/en/integrations/connect-erp/selection-products.png


## Related topics

- [Add user-defined field](https://docs.superoffice.com/en/custom-objects/admin/add-udef.md)
- [Add layout](https://docs.superoffice.com/en/customization/screen-designer/admin/add-layout.md)
