Configuring subscribes and unsubscribes

  • Updated

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

This topic describes how to configure the newsletter subscription and unsubscription feature, if you are using Spryker as an e-commerce platform with Optimizely Campaign. Learn which data fields are to be transmitted to Optimizely Campaign and how to reference the unsubscribe link in your newsletter to your Spryker e-commerce platform.

Transmitting registration data to Optimizely Campaign

The registration data is transmitted via HTTP request to Optimizely Campaign. The following data fields are transmitted:

Field name Data type Description Mandatory field
email String Recipient's email address – also the recipient's unique ID
salutation String Title (Mr/Ms) of the recipient
firstname String Recipient's first name
lastname String Recipient's last name
customer_shop_locale String Language of the shop via which the customer has registered (transferred automatically)
spryker_id String Spryker-internal shop customer ID
customer_shop_url String Shop URL of the customer (transferred automatically)
customer_login_url String Login URL of the customer (transferred automatically)
subscriber_key String Individual key of user in Spryker Commerce (transferred automatically)

Referencing the unsubscribe link to Spryker

Recipients of a commercial mailing must have the possibility to unsubscribe, see Deliverability best practices. Usually this is guaranteed by an unsubscribe link located in the footer of the newsletter. To redirect the unsubscribe link to Spryker, adjust the field function in the unsubscribe link.

This example refers to a message template. You must change the unsubscribe link in all mailings that have already been created but not yet sent.

  1. Open the Optimizely Campaign menu select Campaigns > Message Templates.
  2. Select the message template you want to edit, and click Edit.
  3. In the Edit message template window, in the left Edit area, click the name of the paragraph that contains the unsubscribe link.
  4. In the right Content area, in the Text field, click Source .
  5. Replace the unsubscribe link with the following code: {Unsubscribe Link}?Subscriber_key={subscriber_key}

    Image: Replacing the unsubscribe link

  6. Click ApplyCloseSave and close.