# Importing transactional data

By importing transactions to Synerise, you can [prepare analyses of transactions](/docs/analytics). The output of the import is transaction.charge events generated on the profile cards of customers indicated in the imported file.

## Requirements
---
- You need user permissions that grants you access to Simple Imports or/and Automation
- Prepare a `.csv` file that contains the following data (the list contains recommended column names, if you use different names you will be able to map/transform data during the process):  
    - a `client` column - a column with profile identifiers, you can use one of the following identifiers: email, uuid, clientId, or customID.
        
      <div class="admonition admonition-warning"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" /></svg></div><div class="admonition-body"><div class="admonition-content">

      If you choose an email as an identifier, pay attention to the correct format of emails. Otherwise, your import will fail.

      </div></div></div>

    - an `orderId` column which contains IDs of the transactions
    - a `paymentInfo.method` column which describes how the transaction was paid (for example, cash, online, and so on)
    - a `products.finalUnitPrice.amount` column which contains the final price of items
    - a `products.finalUnitPrice.currency` column which contains the currency of the final price
    - a `products.quantity` column which contains the number or quantity of purchased items
    - a `products.sku` column which contains the SKU of purchased items
    - a `revenue.amount` column which contains the amount of the transaction
    - a `revenue.currency` column which contains the currency of the transaction
    - a `value.amount` column which contains the amount of the transaction before taxation
    - a `value.currency` column which contains the currency of the transaction value before taxation
    - a `source` column which contains the source of transaction (for example, POS, WEB_MOBILE, WEB_DESKTOP, MOBILE_APP, MOBILE, DESKTOP)
    - Spaces and special characters in the column headers are not allowed.
    - `.csv` files must be UTF-8 encoded
    - The file cannot contain empty fields. If you want to leave empty fields, enter the `null` value.
    - Maximum file size: 200 MB.
- To add the original dates for transactions, include the `recordedAt` parameter with values in the `yyyy-MM-dd'T'HH:mm:ss'Z'` format (for example, `2025-10-01T12:02:06Z`), otherwise, the transaction will be added with the date of the import.  
    
  <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

  More information about time formats for the `recordedAt` parameter can be found in the ["Create a transaction" method](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Events/operation/CreateATransaction).

  </div></div></div>



**Example**

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/settings/_gfx/file-example.png" alt="Image presents the example of file" class="full" >
<figcaption> Image presents the fragment of the example file </figcaption></figure>

### Tips for preparing a CSV file

- Recommended file metacharacters:
    - A character that splits columns (delimiter): `,`
    - A character that is used to contain the text (quotation mark): `"`
    - A character (escape character) that changes the default interpretation of a sign or string followed by the escape character: `/`
- For more details about parameters and their accepted formats, click [here](https://developers.synerise.com/DataManagement/DataManagement.html#operation/CreateATransaction).



## Procedure
---

### Selecting the file for import 

In this part of the process, you will upload a file from your device.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon"> **Data Modeling Hub > Imports > New import**.
2. As the data type for import, select **Transactions**.
3. As the import method, select one of the following options:
    - Import a local file - To import a single `.csv` file to Synerise.
    - Import in Automation - To import a .`csv`, `.json`, `.jsonl`, and `.xml` files and execute periodical imports.


      <div class="content-tabs" data-tab-group="tabgrp-1267">
      <div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1267-0" data-tab-group="tabgrp-1267" data-tab-active="true">Local File</button><button class="tab-button" data-tab-id="tabgrp-1267-1" data-tab-group="tabgrp-1267">Automation</button></div>

      <div class="tab-panel" data-tab-id="tabgrp-1267-0" data-tab-group="tabgrp-1267" data-tab-active="true">

      1. Upload the `.csv` file by using the **+ Upload file or drop one here** field.
      2. Optionally, you can customize the file metacharacters by clicking the arrow down icon.
          1. From the **Delimiter** dropdown, select the character that marks the end of a column.
          2. From the **Quotation mark** dropdown list, select the characters that contain the text or data type.
          3. From the **Escape character** dropdown lists, select the character which changes the default interpretation of a character or a string followed by the escape character.
      3. To proceed to the next step, click the **Next** button.  

      ### Mapping the columns with parameters in Synerise

      In this part of the process, you will connect the columns from the file with their counterparts (the existing parameters) in Synerise. This way, you will point which parameters in Synerise will contain the event information from the imported file.  
      During mapping, you can:  
      - exclude parameters from the import. 
      - create new event parameters in Synerise to map the data in the input file to them. 
        Note that all custom parameters will be imported as additional transaction parameters.

      Remember that you can't add new columns to the imported file while mapping.

      1. Next to the file column name, from the dropdown list, select the corresponding parameter in Synerise. Perform this step for all columns in your file. 
      2. To exclude a parameter from import, next to the column name, click this icon: <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/mapping-arrow.png" alt="An arrow icon" class="icon" >  
          **Result**: The icon changes to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dont-import-icon.png" alt="Don't import icon" class="icon" >
      4. To proceed to the summary of the import, click **Next**.  


      ### Counting revenue

      In this part of the process, optionally, you can enable automatic calculation of the revenue which is the multiplication of the item quantity by its price. 

      1. Enable the **Calculate revenue** option. 
      2. In the **Product unit price** field, from the dropdown list select the name of the column that contains the price of a single piece of an item.
      3. Confirm by clicking **Next**.
          **Result**: The summary of the import is displayed.
      5. After checking the import summary, to start the import, click **Run import**.  
          **Result**: The output of the import is `transaction.charge` events generated on the profile cards of customers indicated in the imported file.

      ### Launching import

      After steps described above you'll be redirected to the mapping summary. If it's correct, to launch the import, click **Run import**.

      </div>

      <div class="tab-panel" data-tab-id="tabgrp-1267-1" data-tab-group="tabgrp-1267">

      1. Select the method of delivering the file:
          - Local File - This option allows you to upload a file from your device.
          - SFTP protocol - This option allows you to upload a file from a server using the SFTP protocol.
          - HTTPS protocol - This option allows you to upload a file from a server using the HTTPS protocol.  
          - Amazon S3 - This option allows you to upload a file from Amazon S3 bucket.
          - Azure - This option allows you to upload a file from Azure Blob Storage.
          - Google Cloud Storage - This option allows you to upload a file from Google Cloud Storage.
      2. Click **Go to import template**.  
      3. Define the settings of the [Scheduled Run node](/docs/automation/triggers/scheduled-run).
      4. Depending on the method of delivering the file, configure the settings of [Local File](/docs/automation/integration/http-integrations/http-get-file) or the [Get File](/docs/automation/integration/http-integrations/http-get-file) node that uses HTTP protocol or the [Get File](/docs/automation/integration/sftp-integrations/sftp-get-file) node that uses SFTP protocol. 
      5. If the data requires modification, configure the settings of the [Data Transformation node](/docs/automation/operation/data-transformation-node). If you have prepared the transformation rules for the data structure of the imported file, select it from the dropdown list. If not, create it from scratch.  
          You can remove this node if your data doesn't require transformation.
      6. The rest of the nodes in the default template don't require any further configuration.
      7. If your workflow is ready, click **Save & Run**.

      </div>
      </div>
