# Building Import/Export Utility

Xoro has a feature that allows users to import and export data seamlessly between external systems and Xoro by using customizable templates. These templates are designed to convert data to match the format required by Xoro, which eliminates the need for manual data manipulation using programs like Excel.

One of the most common uses of this feature is for managing external B2B orders. Typically, an external B2B system will generate orders in a .csv file that is not directly compatible with Xoro's data format. To address this, a specialized utility can be created, which will allow you to upload the B2B file export as-is into Xoro. This utility automatically maps the data to the appropriate fields in Xoro, allowing for a quick and efficient upload process.

### **Building Utilities**

Creating an import/export utility involves defining mapping details, such as the export entity, type, CSV file to map, utility name, and language type. Once the basic details are defined, you can then proceed to configure the specific field mappings.&#x20;

To accommodate various business needs, these utilities can cater to different types of data operations, such as:

* Order Upload
* Wave Export
* Inventory Export
* Exporting of shipping waves, etc.

{% hint style="info" %}
To create an import/export utility, go to **Menu > Utilities > Import/Export Utility**
{% endhint %}

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FF543VVNNC2PC6GSLmmvB%2Fimage.png?alt=media&#x26;token=74e93d43-c8e6-4f44-a761-264f59184f94" alt=""><figcaption></figcaption></figure>

#### Mapping Details Fields

| Field                                  | Description                                                                                                                                                                                           |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Entity                                 | This field allows you to select the module for which you want to create the utility.                                                                                                                  |
| Utility Name                           | Enter a name for the utility. This will act as a unique identifier for the utility.                                                                                                                   |
| Language Type                          | You can code some of the values while creating the mapping. This field allows you to select the programming language (C# or Javascript) to code some of these expressions, in the expressions column. |
| Custom Export Format/Pre Import Script | If you wish to input a personalized script for utility creation, select this option, and a "Custom Script" screen will appear. This space allows you to compose the script for the utility.           |
| Type                                   | Select the utility type you want to create: Import or Export.                                                                                                                                         |
| CSV Format                             | Select "Choose File" within this field to upload the file in the external format.                                                                                                                     |
| Edit External Format                   | Select this option to edit the values in the CSV file that you have uploaded.                                                                                                                         |

Once you have selected the mapping details, click on "Map" to create a mapping between the external format and the Xoro format.&#x20;

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FI57vhT1fkEf4IUChLk9A%2Fimage.png?alt=media&#x26;token=e4dcb086-d5ef-44ab-aea2-1944ea5d6a75" alt=""><figcaption></figcaption></figure>

All the respective fields from the uploaded file will be populated in the "Mapping" section below.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FYhNKOs7v70DTLJ4tMgvj%2Fimage.png?alt=media&#x26;token=b59f1c0d-7ea0-402e-9c2a-c7a8c39e9d9c" alt=""><figcaption></figcaption></figure>

Mapping Fields

<table><thead><tr><th width="175">Field</th><th>Description</th></tr></thead><tbody><tr><td>External Format</td><td>This field captures the format of the external system to map.</td></tr><tr><td>Xoro Format</td><td>This field captures the format as it is on Xoro to map.</td></tr><tr><td>Expressions</td><td>If you intend to assign a value to a specific field, you can utilize this field to encode the desired value.</td></tr></tbody></table>

After the mapping of the columns is done, click on “Save”. This will save the data and create the utility.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2Fxo59eCWwatin0kwLMu30%2Fimage.png?alt=media&#x26;token=2e5abad9-d5c0-4274-9fa1-7182c6900060" alt=""><figcaption></figcaption></figure>

### **Requesting a New Utility**

If you believe you need a custom utility for your specific data integration needs, you can request one by:

1. Logging a support ticket.
2. Including a sample.csv file from your external system.

By doing so, the Xoro team can design a utility tailored to your unique data import/export requirements.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xorosoft.com/xoroerp-1/utilities/import-export-utility/building-import-export-utility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
