Transactional emails for Shoptet Premium

Jaroslav Bouška Jaroslav Bouška
5. September 2025

For Shoptet, we can provide custom visuals for transactional emails that notify customers about order changes. With the current implementation, we can only support the Premium version.

To set up the integration, get an API key from Shoptet (Integration -> Private API -> Add). We recommend creating a new API key just for Boldem and naming it appropriately, e.g. Integration with Boldem.

In Boldem go to Settings -> Integrations -> New integration. From the “Select integration type” menu choose “Shoptet Premium API” (you need to have the Shoptet Premium module activated) and enter the API key in the field. Click the “Test Integration” button and then “Save and continue”. Only one integration per URL can exist in an account. If one already exists, saving will not proceed.

Check the boxes to set the integration to “Active” and to “Send order emails”.
Click the “Set up integration” button.

The integration will load your order statuses in the background and display them in the “Select order category” menu. For each order status, you can choose a transactional template that will be dispatched to the customer. After selecting, click “Set combination”.

You’ll see a modal window with the currently selected combination. Here you can choose whether the selected combination should be sent to the customer or only to operators. You can have multiple operators — just separate the email addresses in the field with “;” or “|”. The sent order summary can also include a static file, e.g., the terms and conditions, which will be attached to the email.
If you’re still preparing the emails, leave the “Send to customer” checkbox grayed out and have the emails sent only to your email address.

When we receive a notification from Shoptet that an order status has changed, we check whether we have a template mapping configured for that order status. If we find a suitable mapping, a transactional email is prepared for dispatch. Order data are inserted into a variable in the email – ShoptetOrderModel data model. You can output the data in the template using the “order” variable. To display the order ID, use {{ order.code }}.

Example:

Hello,{{if order.billingAddress.firstName != null}} {{vokativ order.billingAddress.firstName}},{{end}}
We have successfully received your order no. {{order.code}}.

We will keep you informed about the next steps.

Example of the full billing address:


{{if order.billingAddress != null}}
{{if order.billingAddress.fullName != null}}{{order.billingAddress.fullName}}<br/>{{end}}
{{if order.billingAddress.company != null}}{{order.billingAddress.company}}<br/>{{end}}
{{if order.billingAddress.street != null || order.billingAddress.houseNumber != null}}{{if order.billingAddress.street != null}}{{order.billingAddress.street}}{{end}}{{ if order.billingAddress.houseNumber != null}}{{order.billingAddress.houseNumber}}{{end}}<br/>{{end}}
{{if order.billingAddress.city != null}}{{order.billingAddress.city}}<br/>{{end}}
{{if order.billingAddress.zip != null}}{{order.billingAddress.zip}}<br/>{{end}}
{{if order.billingAddress.countryCode != null}}
    {{getCountryName(order.billingAddress.countryCode)}}
{{end}}
{{end}}

If you have an order status–template combination set up, you can test the selected setting.
Use the “Send test email” button in the top left. Clicking it opens a modal that will ask for the order ID from Shoptet. You can get the ID in the Shoptet admin; choose only orders that are configured with the selected template.

Filter helper functions

For helper functions, we recommend creating your own HTML template block that you’ll load into all Shoptet transactional templates, e.g., named customFunctions.

{{ include 'customFunctions' }}
{{func getCountryName(countryCode)
    case countryCode
      when 'CZ'
          ret 'Czech Republic'
      when 'FR'
          ret 'France'
      when 'IT'
          ret 'Italy'
      when 'DE'
          ret 'Germany'
      when 'GB'
          ret 'United Kingdom'
      when 'PL'
          ret 'Poland'
      when 'SK'
          ret 'Slovakia'
      when 'UA'
          ret 'Ukraine'
      else
          ret 'Other'
    end
end}}

{{ func filterForProducts(item)
    ret item.itemType == 'product'
end }}
{{ func filterForShipping(item)
    ret item.itemType == 'shipping'
end }}
{{ func filterForPayment(item)
    ret item.itemType == 'billing'
end }}

{{products = array.filter order.items @filterForProducts}}
{{shippings = array.filter order.items @filterForShipping}}
{{payments = array.filter order.items @filterForPayment}}

Posting email dispatch information back to Shoptet

If you want to send back to Shoptet information about which email was dispatched to the customer, you can enable this feature using “Save note”. After successful processing, information about which template was dispatched and to whom the email was dispatched is recorded in the order history in Shoptet.

Example of adding a note in Shoptet.

Stop email dispatch

If you don’t want to send order emails to customers in certain cases, just add the text “[BOLDEM_STOP]” to the order note. When Boldem loads the order from the Shoptet API it will detect this note and the email won’t be sent to the customer.