Importing and exporting records by using scenarios
/visma-net-erp/help/integration/importing-and-exporting-records-by-using-scenarios
section
After you have created an integration scenario, you can use it to transfer data between Visma Net and the external system or file.
2026-02-19T17:09:06+01:00
# Importing and exporting records by using scenarios
After you have created an integration scenario, you can use it to transfer data between Visma Net and the external system or file.
You import records in the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window by using the import scenario you have created. Similarly, you export records in the [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/) window by using the export scenario you have created.
In this chapter, you can find a description of standard data import, simplified data import, and data export.
Data import
/visma-net-erp/help/integration/importing-and-exporting-records-by-using-scenarios/data-import
page
After you have created an import scenario, you should test it on one record.
2026-02-19T17:09:06+01:00
# Data import
After you have created an import scenario, you should test it on one record.
After you have created an import scenario, you should test it on one record.
If the scenario
is not working as you expected, the first way to troubleshoot the scenario is to reproduce
the mapping instructions manually on the window to which you want to import the data. In most
cases, this troubleshooting step helps you quickly identify the reason why the scenario is
not working, so that you can fix the scenario and continue.
After you have tested an import scenario, you can use it to import data in the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window.
To import external data to Visma Net by using a scenario that has already been created, you should perform the steps, which
are described in this topic.
## 1. Selecting an import scenario
In the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window, you first select the name of the scenario that has been created for data import.
You can select a scenario from only the scenarios that work with windows in which you can enter data. If you do not have the access rights to enter data in the window, you cannot use a scenario that imports data to this window either. If you do not have access rights to a particular window, you will not see any scenarios for this window listed among the other scenarios. You can view the access rights to particular windows in the [Access rights by window (SM201020)](/visma-net-erp/help/access-management/user-security/user-security-windows/access-rights-by-window-sm201020/) window.
## 2. Uploading a new file version
If you are not using a file for importing data, skip this step.
If you are importing data from a file, decide whether you need to upload a new version of the
file.
The file that is used for data import is attached to the window; you can click
**Files** in the title bar to view the file.
This file is attached to
each of the following windows: [Data providers](/visma-net-erp/help/integration/integration-windows/data-providers-sm206015/), [Manage import scenarios (SM206025)](/visma-net-erp/help/integration/integration-windows/manage-import-scenarios-sm206025/), and [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/).
If you need to use a new version of the file when importing data, you can upload the new file to the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window by clicking **Upload file version** in the window toolbar. The schema of the uploaded file must match the schema defined in the data provider and used in the import scenario. If you have changed the file structure, you have to update the data provider and the import scenario, and only then can you use the new file to import the data.
If there is no file attached to the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window, you have to upload the file either by
dragging the file to the window or by using the **Files** menu.
Do not
use the **Upload file version** button to upload the file. After the
file is uploaded to the window, you can update the version of the file by clicking
**Upload file version**.
## 3. Preparing the data for import
You prepare records by uploading them in the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/)
window.
To prepare the data for import, you click the
**Prepare** button in the window toolbar.
The data is displayed on the
**Prepared data** tab; no data is yet imported into the system.
## 4. Importing the prepared data
To import data to the system, you click the **Import** button in the window
toolbar of the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window.
The system tries to
import the records with the **Active** check box selected one by one.
After a record has been successfully processed, the system selects the
**Processed** check box for this record.
If an error occurs during the
processing of a record, the process stops on the record that caused the error.
## 5. Correcting any errors
If an error occurred during the import process, you have to review the error; you then do one of the following: correct the record that caused the error, or exclude the wrong record from import, or modify the import scenario. Then you have to run the import process again to process the remaining records.
If you need to correct only a small number of records, you can correct them directly on the
**Prepare data** tab, click **Save**, and click
**Import** again.
You can exclude an incorrect record by clearing the
**Active** check box, saving your changes, and clicking
**Import** again.
If you need to correct a large number of records or all records, you can correct the records in the source, upload a new file version if you are importing data from a file, and prepare and import the data again.
If you need to correct the import scenario itself, make changes to the scenario in the [Manage import scenarios (SM206025)](/visma-net-erp/help/integration/integration-windows/manage-import-scenarios-sm206025/) window, and prepare and import the
data again in the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window. You can
clear the history of scenario execution and clear the prepared data by clicking
**Roll back** on the **History** tab of the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window.
The **Roll back** action
doesn't reverse records that have already been imported.
## Summary of data import
After you have imported data, open the destination window and make sure that the imported records appear among the records.
Simplified scenarios for data import
/visma-net-erp/help/integration/importing-and-exporting-records-by-using-scenarios/simplified-scenarios-for-data-import
page
With simplified scenarios, you skip the step of creating the data provider before you create the import scenario.
2026-02-19T17:09:06+01:00
# Simplified scenarios for data import
With simplified scenarios, you skip the step of creating the data provider before you create the import scenario.
With simplified scenarios, you skip the step of creating the data provider before you create
the import scenario.
You compose the mapping directly in the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window and then you immediately run the import procedure in the
window.
Simplified scenarios are appropriate for one-time import, such as during data migration.
For
data migration, you can prepare all data in the source file in the format needed for import
and use a straightforward mapping of the source fields to the target fields.
If you need to
compose a complex scenario which might involve using custom keys, searching for records,
and modifying service commands, you have to use regular import scenarios that you compose
by creating the data provider and then defining the mapping in the [Manage import scenarios (SM206025)](/visma-net-erp/help/integration/integration-windows/manage-import-scenarios-sm206025/) window.
To import data by using a simplified scenario, you have to complete the following steps:
1. **Upload the file** You first upload the file with data that you want to import to the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window. You can upload an Excel, a CSV, or an XML file. The following criteria should be met for the source files for a simplified scenario:
+ Only the data from the first sheet of an Excel file is imported.
+ A CSV file should use a comma (,) as the delimiter and have US-ASCII encoding. These default parameters are used for data provider creation.
+ An XML file should have US-ASCII encoding and a tree structure. These default parameters are used for data provider creation.
1. **Specify the parameters of the import scenario**
Also in the [Manage import scenarios (SM206025)](/visma-net-erp/help/integration/integration-windows/manage-import-scenarios-sm206025/) window, you specify the Visma Net window to which you want to import data.
The system suggests the scenario name
depending on the selected window, but you can change the name.
The system automatically
detects the type of the data provider based on the extension of the uploaded file.
When
you click **Save**, the system automatically creates an import
scenario (with default parameters and the specified name) and a data provider of the
specified type for the simplified import procedure.
1. **Configure mapping**
You configure mapping between the fields of the external file
and the fields of the Visma Net window on the **Mapping** tab of the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window.
You should select the source field and the corresponding target
object and field.
You use the same target objects and fields that are used in regular
import scenarios that you create in the [Manage import scenarios (SM206025)](/visma-net-erp/help/integration/integration-windows/manage-import-scenarios-sm206025/)
window.
However, in simplified scenarios, you cannot use service commands and actions.
You should select the **Key** check box for the fields that
should be used as key fields to distinguish records that belong to different documents.
You can use as keys only the fields that are mapped to the fields of the summary
object.
You can map the fields of the source file in any order.
After you have
saved the mapping, the system places the fields in the correct order and creates the
import scenario mapping.
The system adds all actions (including ``) and service commands to the import scenario automatically.
1. **Prepare and import data**
After you have specified the scenario mapping, you can prepare and import data in the same way as you do with regular import scenarios.
Simplified scenarios are not available for editing in the [Manage import scenarios (SM206025)](/visma-net-erp/help/integration/integration-windows/manage-import-scenarios-sm206025/) window, and you cannot edit the data provider that was automatically created for the simplified import scenario. If the simplified scenario is not working, you should convert the simplified scenario to a regular scenario by clicking **Convert to manual scenario** in the [Import by scenario (SM206036)](/visma-net-erp/help/integration/integration-windows/import-by-scenario-sm206036/) window.
Data export
/visma-net-erp/help/integration/importing-and-exporting-records-by-using-scenarios/data-export
page
You use the Export by scenario (SM207036) window for data export.
2026-02-19T17:09:06+01:00
# Data export
You use the Export by scenario (SM207036) window for data export.
For more information: [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/).
To export data from Visma Net to an external source, you perform the steps, which are described in this topic.
## 1. Select an export scenario
In the [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/) window, you select the name of the scenario created for data export.
## 2. Prepare the data for export
You prepare records by uploading them in the [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/) window.
The
system performs all modifications defined by the scenario and uploads the modified data in
the window.
To prepare the data for export, you click the **Prepare**
button in the window toolbar.
You can view the data on the **Prepared data** tab of this window.
## 3. Export prepared data
To run the export process, you should click **Export** in the window
toolbar of the [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/) window.
The system tries to export the records
that have the **Active** check box selected.
## 4. Correct any errors
Make sure each record has the check box in the **Processed** column on the **Prepared data** tab of the [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/) window selected, which means that this record has been successfully exported. The result of export may include errors, which are indicated by the icon on the window toolbar.
## 5. Download the results of the export
If you are exporting data to a file, during export, the system creates a new
version of the file attached to the [Export by scenario (SM207036)](/visma-net-erp/help/integration/integration-windows/export-by-scenario-sm207036/) window.
This file has the
same structure as the file that was used for data provider creation. You can download the
result of export by clicking the **Get latest version** button in the window
toolbar.
Internal data is exported to the external data source in a table window. That means
that the values of the fields of detail objects are translated to multiple rows of this
table.
The number of rows is equal to the number of detail lines of the source record. Each
of these rows has the values of the fields of the summary object and related objects
specified.
For example, suppose that in the [Sales invoices (AR301000)](/visma-net-erp/help/customer-ledger/customer-ledger-windows/sales-invoices-ar301000/) window, a sales invoice has three detail lines. If you export this invoice with the detail lines, the data prepared for export will include three records for this invoice, one record for each detail line. These records will include identical values of the fields of the invoice summary, such as type and reference number, and different values of the detail line fields.