---
title: Sending transactional mails
slug: campaign/docs/5ZOJ-sending-transactional-mails
docTags: 
createdAt: 2026-07-20T15:45:12.264Z
---

:::hint{type="info"}
**Note**

This topic is for administrators and developers with administration access rights in Spryker.
:::

This topic describes how to configure sending of transactional mails when using Spryker as e-commerce platform with Optimizely Campaign. The sending is done via HTTP-API directly from Spryker.

You can use transactional mails to respond to customers' actions in your shop, such as order confirmations, or to send system emails, which include:

- Login confirmation
- Password changes and confirmation
- Order confirmations

## Configuring transactional mails in Optimizely Campaign

Sending of transactional mails requires a template in Optimizely Campaign, which uses field functions to insert sent variables into relevant locations. This creates the finished transactional mail with layout, and sends it to the recipient. The sending and receiving of the content of the variables takes place using the transaction recipient list as a buffer.

1. The Spryker integration sends the variables.
2. The variables are written into the transaction recipient list: each variable into the relevant recipient list field.
3. Using field functions, Optimizely Campaign copies the template with the individual variables from the transaction recipient list and places it into the desired location in the transactional mail.

![Image: Sending and receiving content of variables](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/SH5COP2ExhZGtZ2Y61L2m-20260720-145347.png "Image: Sending and receiving content of variables")

### Recipient list fields in Optimizely Campaign's transaction recipient list

By default, the transaction recipient list contains the following fields.

| Field name                    | Data type | Description                                |
| ----------------------------- | --------- | ------------------------------------------ |
| email                         | String    | Email (required)                           |
| salutation                    | String    | Title                                      |
| firstname                     | String    | First name                                 |
| lastname                      | String    | Last name                                  |
| spryker\_id                   | String    | Spryker ID                                 |
| customer\_shop\_locale        | String    | Language setting in customer shop          |
| customer\_shop\_url           | String    | Customer shop url                          |
| customer\_login\_url          | String    | Customer login url                         |
| customer\_reset\_link         | String    | Customer reset link                        |
| language                      | String    | Language                                   |
| order\_number                 | String    | Order number                               |
| order\_comment                | String    | Order comment                              |
| order\_orderdate              | String    | Order date                                 |
| order\_subtotal               | String    | Order Subtotal                             |
| order\_discount               | String    | Discount on order                          |
| order\_tax                    | String    | Tax on order                               |
| order\_grand\_total           | String    | Total sum of order                         |
| order\_total\_delivery\_costs | String    | Delivery costs                             |
| order\_total\_payment\_costs  | String    | Payment costs                              |
| subscriber\_key               | String    | Individual key of user in Spryker Commerce |

## Creating a template in Optimizely Campaign

Create a template and add the desired transactional mail texts (the unchangeable, static texts that are to be sent to recipients). Insert field functions in places where you want to show content of the Spryker variables.

### About field functions

[Field functions](docId\:V9V1TFA5Z2cDQH6hNQy59) are placeholders that refer to a specific recipient list field in your transaction recipient list. The variables and content of the variables sent from Spryker are written into the relevant recipient list fields in your transaction recipient list. Your field functions load relevant content from the referenced recipient list field in the next step.

**Example**

Set up a transactional mail text that welcomes each customer using the last name and the order date. For this you would need the variables **salutation**, **lastname** and **order\_orderdate**.

The content of the variables is first written to a relevant recipient list field of the transaction recipient list (from Spryker via the HTTP API). To access these recipient list fields, insert the individual field functions into the Optimizely Campaign template and place the name of the recipient list field in curly brackets. To import the variable contents, the static text and field functions in the Optimizely Campaign template could look like this:

`Hello, {salutation} {lastname}!`
`Thank you for your online order from {oder_orderdate}.`

The example will appear in the sent transactional mail as follows:

Hello, Mr. Miller! Thank you for your online order from August 3.

To create the template, do the following:

1. Open the Optimizely Campaign[ menu](docId\:PmNPgvNucBrAG5Rw8f41f) and select **Campaigns** > **Transactional Mails**.
2. Click **Create…**.

   ![Image: Create transactional email](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Zh2OOA68NkDYGr2fpo3-9-20260720-145347.png "Image: Create transactional email")
3. Drag the **Recipients** node from the left action area to the workspace area on the right.
4. In the **Recipient lists** drop-down list, select your transaction recipient list.

   ![Image: Selecting transaction recipient list](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/TlATP7t0rxlCxKBKaVT3v-20260720-145347.png "Image: Selecting transaction recipient list")

   :::hint{type="info"}
   **Note**

   [Customer support](docId\:ZWe1T3UPz3JW6_4mc76qV) sets up a separate transaction recipient list. Be sure you use this transaction recipient list, instead of a regular recipient list. To see if a recipient list is a transactional recipient list, check the column **Transaction API**.
   :::
5. From the left action pane, drag an **Email**message node into the workspace.
6. In the **Name** box, assign a concise name to your transactional mail (for example, *Order confirmation*).

   ![Image: Edit confirmation name](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/_bYQvagi9OOeV0DREjBSw-20260720-145347.png "Image: Edit confirmation name")
7. In the context menu for the message node, click **Edit Content…**.
8. In the **Template** drop-down list, select the desired template and confirm your selection by clicking **Next**.
9. Configure the template for the transactional mail according to your requirements. Enter a subject and insert the static texts that you want recipients to receive, into the content paragraphs. Insert the relevant field function for the recipient list field of the transaction recipient list into places where variables from Spryker should appear (see the previous example in this topic).
10. Click **Close**.
11. Connect the **Recipient** node with the message node.
12. Click **Save and Close**.
13. To activate your transactional mail and start the sending process, select the mailing in the **Transactional mails** overview and click **Start**.

## Configuring transactional mails in Spryker

To set up transactional mails in Spryker, follow the steps on the [Spryker documentation website](https://docs.spryker.com/).
