
This node allows you to initiate an import of transactions to Synerise. The transactions are imported in the form of the `transaction.charge` events and they are saved in a profile's history with the timestamps declared in the imported file.

The configuration view contains a list of required parameters that must be included in the imported file.  
Optionally, you may use enable automatic calculation of revenue. The system recognizes the items purchased within a specific transaction based on the order ID and multiplies the quantity of purchased items by the price of a single item piece. The result of the calculation is saved in the following parameters of the `transaction.charge` event: `revenue.amount` and `revenue.value`.


<div class="admonition admonition-important"><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 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

If you enable automatic calculation of revenue in the node configuration, the imported file doesn't have to include the `revenue.amount` and `revenue.value` columns. If the file includes these columns, the system will overwrite the values in these columns with its calculation.

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


## Requirements
---
- The file must include the following columns (case-sensitive):
    - each transaction must have at least one of the following customer identifier columns: `client.email`, `client.id` `client.customid`, `client.uuid`
    - `orderId`
    - `paymentInfo.method`
    - `products.finalUnitPrice.amount`
    - `products.finalUnitPrice.currency`
    - `products.name`
    - `products.quantity`
    - `products.sku`
    - `revenue.amount`
    - `revenue.currency`
    - `value.amount`
    - `value.currency`


   <div class="admonition admonition-important"><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 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   Rows can be considered a single transaction only if all of the following conditions are met:
   - they are adjacent to each other, 
   - have the same value of `orderId`,
   - have the same value of `recordedAt` (if provided).

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



- This node must be preceded by one of the following nodes:
    - [Local File](/docs/automation/operation/local-file-node)
    - [SFTP](/docs/automation/integration/sftp-integrations)
    - [HTTP](/docs/automation/integration/http-integrations) 

## Node configuration
---
No configuration is required. However, optionally you can enable automatic calculation of the revenue:
1. Enable the **Calculate revenue** option. 
2. In the **Product unit price** field, enter the name of the column (in the case of importing transactions from CSV file), or the name of the parameter that contains the price of a single piece of an item.
3. Confirm by clicking **Apply**.

## Example of use
---
You can launch a single import of transactional data to Synerise for a particular customer. The file used in this example contains transactions for one customer.


<details class="accordion"><summary>The file used in this example</summary><div class="accordion-content"><pre><code class="language-plaintext">orderId,paymentInfo.method,products.finalUnitPrice.amount,products.finalUnitPrice.currency,products.name,products.quantity,products.sku,revenue.amount,revenue.currency,value.amount,value.currency,client.id 1,cash,13.99,PLN,shoe1,1,990,13.99,PLN,13.99,PLN,4421574246</code></pre></div></details>


<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/import-transactions-example.png" alt="The final configuration of the import transactions workflow" class="full">
<figcaption>The final configuration of the import transactions workflow</figcaption>
</figure>

1. Start the workflow with the **Scheduled Run** node.  
2. In the configuration of the node:  
    1. Set the **Run trigger** to **one time**.  
    2. Select the **Immediately** tab.  
    3. Click **Apply**.  
3. Add the **Local File** node.  
4. In the configuration of the node:  
    1. Upload the file with transactions.
    2. Click **Apply**.  
5. Add the **Import Transactions** node.  
6. Add the **End** node.

