Configuring subscribes and unsubscribes

  • Updated

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

This topic describes how to configure the newsletter subscription and unsubscription feature, if you are using Shopware as an e-commerce platform with Optimizely Campaign. The Shopware integration uses standard formulas that contain Shopware for newsletter registration. You cannot add fields.

See Advanced configuration how to work with multiple sub-shops and language versions.

To configure subscribes and unsubscribes, do the following:

  1. Configure the opt-in mailing (registration confirmations) in Optimizely Campaign, then use a field function to reference the confirmation link to your shop.
  2. Insert the opt-in ID and the authorization code (for recipient consent) in Shopware.
  3. Enable the use of the double opt-in method in Shopware.

Step 1. Configuring the opt-in mailing

  1. Open the Optimizely Campaign menu and select Campaigns >Opt-in processes.
  2. Select the opt-in process for the connection to your shop and click Edit….

    Image: Edit confirmation

  3. On the Email node, click Properties .
  4. Click Edit Content….

    Image: Email node

  5. Click the name of the paragraph that contains the registration confirmation link.
  6. In the Text area, click Source.

    Image: View source

  7. Replace the existing link with the following code lines or field functions:

    You can find the link that you need to replace between the <a> tags in quotation marks.


    In the source code, the following link is contained in <a> tags:

    <a href="">Confirm subscription</a>

    Replace the link marked in red in quotation marks as follows:

    <a href="{Double-Opt-In-Link}?hash={customer-id}&shop-id={shop-id}&shop={shop}">Confirm subscription</a>

    Image: Replace code

    The Shopware integration accepts the referral (the call), and identifies the customer by the hash parameter and the store or subshop, using the shop-id and shop parameters, respectively.

  8. Click ApplyCloseSave and close.

Step 2. Inserting the opt-in ID and the authorization code

For this step, you need to insert two values in your Shopware system:

  • The opt-in ID used to record recipient consent. To see the opt-in ID, open the Optimizely Campaign menu and select Administration > API overviewOpt-in processes.
  • The authorization code for the recipient list that Optimizely customer support has generated to connect your shop. To locate this in Optimizely Campaign, select Administration > API overview > Recipient lists tab. Select the corresponding recipient list and click Manage authorization codes. If no authorization code is presently available for this recipient list, click Create authorization code.

Do not confuse the recipient list for your newsletter recipients with the transaction recipient list for your transactional mails. Customer support sets up two different types of recipient lists for the sending of newsletters and the sending of transactional mails (for example order confirmations, invoices).

  1. Log in to the back-end of Shopware using administrator rights.
  2. Go to Configuration > Plugin Manager.

    Image: Plugin Manager menu item

  3. On the left side of the menu bar, click Installed.

    Image: Click Installed

  4. In the list, find the Shopware integration for Episerver Campaign in the Plugin Manager, and click Open .

    Image: Open Shopware integration

  5. In the Configuration area, in the optivo bmOptInID box, enter the opt-in ID.

    Image: Enter opt-in ID

  6. In the Configuration area, in the optivo Authorization Code box, enter the authorization code of your recipient list.

    Image: Enter authorization code

  7. Click Save.

Step 3. Enabling the double opt-in method

  1. In Shopware, go to Configuration > Basic settings.

    Image: Basic Settings menu item

  2. Go to Additional settings > Privacy.

    Image: Email Settings

  3. In the Double opt in for newsletter subscriptions drop-down list, select Yes.

    Image: Select double opt-in

  4. Click Save.