> For the complete documentation index, see [llms.txt](https://docs.roivenue.com/roivenue-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roivenue.com/roivenue-resources/roivenue-training/roivenue-app/data/connectors-overview/list-of-connectors/shoptet.md).

# Shoptet

How to build the Shoptet order export and connect it to Roivenue, which XML tags the connector reads, and how orders, revenue and profit are calculated.

Shoptet is an e-shop platform used mainly in the Czech market. The Roivenue connector reads order data from a custom XML export that you create in Shoptet, so most of the setup happens on the Shoptet side. Unlike the advertising connectors, it brings transactions rather than campaign performance.

## Setting up the connector

### 1. Create a custom order export

In Shoptet, open Objednávky, then Export, and choose Vytvořit vlastní typ exportu.

![](https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGvvrlVUvq4TNL0oYP6%2F-MiHpzjV-7v_slEfQMZF%2F-MiI4OFvwuLh20CNVFOK%2Fshoptet1-v2-censored.png?alt=media\&token=a5f6eda1-4382-4af3-9615-ce2ffa78e27d)

![](https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGvvrlVUvq4TNL0oYP6%2F-MhnMm7OKUiiwz208etK%2F-MhnT_5Ngrvk6IbvXWoG%2Fshoptet%20-%202.png?alt=media\&token=7426aaeb-75a2-4304-a310-192e001bb444)

### 2. Set the order states

Tick only Možnosti. Leave Kód dopravy and Stav objednávky unticked, so the export carries everything the connector needs without extra grouping.

![](https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGvvrlVUvq4TNL0oYP6%2F-MiHpzjV-7v_slEfQMZF%2F-MiI52omv-w8sm1fm7gD%2Fshoptet2-v2.png?alt=media\&token=98f45731-7bc8-4c1d-b99f-81501e920815)

### 3. Paste the XML bodies

Into Tělo XML:

```
<ORDER packageNumber="#packageNumber#">
	<ORDER_ID>#id#</ORDER_ID>
	<CODE>#code#</CODE>
	<DATE>#date#</DATE>
	<STATUS>#statusName#</STATUS>
	<CURRENCY>
		<CODE>#currencyCode#</CODE>
		<EXCHANGE_RATE>#currencyExchangeRate#</EXCHANGE_RATE>
	</CURRENCY>
	<CUSTOMER>
		<EMAIL>#email#</EMAIL>
		<PHONE>#phone#</PHONE>
		<BILLING_ADDRESS>
			<NAME>#billFullName#</NAME>
			<COMPANY>#billCompany#</COMPANY>
			<STREET>#billStreet#</STREET>
			<HOUSENUMBER>#billHouseNumber#</HOUSENUMBER>
			<CITY>#billCity#</CITY>
			<ZIP>#billZip#</ZIP>
			<COUNTRY>#billCountryName#</COUNTRY>
			<COMPANY_ID>#billCompanyId#</COMPANY_ID>
			<VAT_ID>#billVatId#</VAT_ID>
			<CUSTOMER_IDENTIFICATION_NUMBER>#customerIdentificationNumber#</CUSTOMER_IDENTIFICATION_NUMBER>
		</BILLING_ADDRESS>
		<SHIPPING_ADDRESS>
			<NAME>#deliveryFullName#</NAME>
			<COMPANY>#deliveryCompany#</COMPANY>
			<STREET>#deliveryStreet#</STREET>
			<HOUSENUMBER>#deliveryHouseNumber#</HOUSENUMBER>
			<CITY>#deliveryCity#</CITY>
			<ZIP>#deliveryZip#</ZIP>
			<COUNTRY>#deliveryCountryName#</COUNTRY>
		</SHIPPING_ADDRESS>
		<IP_ADDRESS>#customerIpAddress#</IP_ADDRESS>
	</CUSTOMER>
	<REMARK>#remark#</REMARK>
	<SHOP_REMARK>#shopRemark#</SHOP_REMARK>
	<REFERER><![CDATA[#referer#]]></REFERER>
	<PACKAGE_NUMBER>#packageNumber#</PACKAGE_NUMBER>
	<VARCHAR1>#varchar1#</VARCHAR1>
	<VARCHAR2>#varchar2#</VARCHAR2>
	<VARCHAR3>#varchar3#</VARCHAR3>
	<TEXT1>#text1#</TEXT1>
	<TEXT2>#text2#</TEXT2>
	<TEXT3>#text3#</TEXT3>
	<WEIGHT>#weight#</WEIGHT>
	<TOTAL_PRICE>
		<WITH_VAT>#totalPriceWithVat#</WITH_VAT>
		<WITHOUT_VAT>#totalPriceWithoutVat#</WITHOUT_VAT>
		<VAT>#totalPriceVat#</VAT>
		<ROUNDING>#totalPriceRounding#</ROUNDING>
		<PRICE_TO_PAY>#totalPriceToPay#</PRICE_TO_PAY>
		<PAID>#paid#</PAID>
                <PURCHACE_PRICE>#orderPurchasePrice#</PURCHACE_PRICE>
	</TOTAL_PRICE>
        <SHOP>
            <projectContactMerchantName>#projectContactMerchantName#</projectContactMerchantName>
            <projectOwnerIdentificationNumber>#projectOwnerIdentificationNumber#</projectOwnerIdentificationNumber>
            <projectOwnerCompanyOrFullName>#projectOwnerCompanyOrFullName#</projectOwnerCompanyOrFullName>
            <projectOwnerCin>#projectOwnerCin#</projectOwnerCin>
            <projectOwnerTin>#projectOwnerTin#</projectOwnerTin>
        </SHOP>

</ORDER>
```

Into Tělo XML pro položky objednávky:

```
<ITEM>
	<TYPE>#orderItemType#</TYPE>
	<NAME>#orderItemName#</NAME>
	<AMOUNT>#orderItemAmount#</AMOUNT>
	<CODE>#orderItemCode#</CODE>
	<VARIANT_NAME>#orderItemVariantName#</VARIANT_NAME>
	<MANUFACTURER>#orderItemManufacturer#</MANUFACTURER>
	<UNIT>#orderItemUnit#</UNIT>
	<WEIGHT>#orderItemWeight#</WEIGHT>
	<STATUS>#orderItemStatusName#</STATUS>
	<DISCOUNT>#orderItemDiscountPercent#</DISCOUNT>
	<UNIT_PRICE>
		<WITH_VAT>#orderItemUnitPriceWithVat#</WITH_VAT>
		<WITHOUT_VAT>#orderItemUnitPriceWithoutVat#</WITHOUT_VAT>
		<VAT>#orderItemUnitPriceVat#</VAT>
		<VAT_RATE>#orderItemUnitPriceVatRate#</VAT_RATE>
	</UNIT_PRICE>
	<TOTAL_PRICE>
		<WITH_VAT>#orderItemTotalPriceWithVat#</WITH_VAT>
		<WITHOUT_VAT>#orderItemTotalPriceWithoutVat#</WITHOUT_VAT>
		<VAT>#orderItemTotalPriceVat#</VAT>
		<VAT_RATE>#orderItemTotalPriceVatRate#</VAT_RATE>
	</TOTAL_PRICE>
</ITEM>
```

![](https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGvvrlVUvq4TNL0oYP6%2Fuploads%2FSZovT5XLGhFNrLKEvIjd%2Fimage.png?alt=media\&token=73d2cb2a-d446-4ac8-be06-440b919e630a)

{% hint style="info" %}
The connector reads a subset of these tags, listed below. Pasting the full block anyway means you do not have to rebuild the export later if you start using more of the data.
{% endhint %}

### 4. Copy the export URL

Save the export, go back to the export page, select it in the list, and copy the URL shown at the bottom. This URL is static, so it keeps working once the connector is set up.

![](https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGvvrlVUvq4TNL0oYP6%2F-MiHpzjV-7v_slEfQMZF%2F-MiI5wlh_V3eSjVthE0V%2Fshoptet5v2-censored.png?alt=media\&token=67642a99-95e1-4607-9f4c-19d4059e8c5e)

### 5. Authorise the connector in Roivenue

Add a Shoptet connector in Roivenue and paste the export URL into the field.

![](https://4279879158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGvvrlVUvq4TNL0oYP6%2F-MivH7NRyMko-uKP8fdM%2F-MivZg4k29pgXCejOeCV%2Fshopte-1v2-censored.png?alt=media\&token=3361f19a-9013-48e7-b935-6e516fe586f0)

{% hint style="warning" %}
Anyone holding that URL can read your order export, including customer names and addresses. Treat it as a credential, and create a new export if it is ever shared by mistake.
{% endhint %}

## What the default setup downloads

The connector walks the export for each `ORDER` element and builds one row per order.

| Roivenue column | Taken from                                                   |
| --------------- | ------------------------------------------------------------ |
| orderId         | `ORDER_ID`                                                   |
| webId           | `CODE`                                                       |
| orderedAt       | `DATE`                                                       |
| status          | `STATUS`                                                     |
| currencyCode    | `CURRENCY/CODE`                                              |
| userId          | `CUSTOMER/EMAIL`, hashed                                     |
| total           | `TOTAL_PRICE/WITH_VAT`                                       |
| revenue         | `TOTAL_PRICE/WITHOUT_VAT`                                    |
| tax             | `TOTAL_PRICE/VAT`                                            |
| profit          | `TOTAL_PRICE/WITHOUT_VAT` minus `TOTAL_PRICE/PURCHACE_PRICE` |
| delivered       | derived from `STATUS`, see below                             |

The connector also reads `SHOP/projectOwnerCompanyOrFullName`, `SHOP/projectOwnerCin`, `SHOP/projectOwnerTin`, `CUSTOMER/CUSTOMER_IDENTIFICATION_NUMBER`, `TOTAL_PRICE/PAID` and the order's `packageNumber`.

### Things worth knowing about these figures

Revenue is the amount without VAT, while total is the amount with VAT. Reports built on revenue will not match a Shoptet screen showing gross totals.

Customer e-mail addresses are hashed before they are stored, so orders can be tied to the same customer over time without Roivenue holding the address itself.

{% hint style="warning" %}
Profit is revenue minus the purchase price of the order. When an order carries no purchase price, profit falls back to revenue, which reads as a 100% margin. If your Shoptet catalogue does not have purchase prices filled in, treat profit from this connector as unusable rather than as a real number.
{% endhint %}

{% hint style="warning" %}
An order counts as delivered only when its status is exactly `Vyřízena`. Renaming that status in Shoptet, or running the shop in another language, leaves every order marked as not delivered. Check this before reading anything into delivery rates.
{% endhint %}

Amounts are parsed using Czech number formatting, so the export has to use a decimal comma.

### When the data refreshes

The job reprocesses the last 90 days on every run, so late changes to an order, including a status moving to `Vyřízena` weeks after the sale, are picked up.

## Troubleshooting

<details>

<summary>Every order shows as not delivered</summary>

The delivered flag is set only for the exact status `Vyřízena`. A renamed status, a translated one, or a different workflow leaves it at zero for every order. Your Account Manager can adjust the connector to match the status your shop actually uses.

</details>

<details>

<summary>Profit equals revenue on every order</summary>

The export carries no purchase price, so there is nothing to subtract. Fill purchase prices in the Shoptet catalogue, and make sure `PURCHACE_PRICE` is present in the Tělo XML from step 3.

</details>

<details>

<summary>Revenue does not match Shoptet</summary>

Revenue is the figure without VAT. Shoptet's own order screens usually show the amount with VAT, which arrives here as total.

</details>

<details>

<summary>Orders are missing fields</summary>

Those tags are missing from the export. Compare the Tělo XML in Shoptet against the block in step 3 and add whatever is absent, then let the connector run again.

</details>

<details>

<summary>The export URL stopped working</summary>

Recreating or deleting the export in Shoptet changes the URL. Copy the current one from the export page and update the connector.

</details>
