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|
|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 easily 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.
- Open the Optimizely Campaign start menuMain screen in Optimizely Campaign, where the available options are grouped together. and select Campaigns > Message Templates.
- Select the message template you want to edit, and click Edit.
- In the Edit message template window, in the left Edit area, click the name of the paragraph that contains the unsubscribe link.
- In the right Content area, in the Text field, click Source .
- Replace the unsubscribe link with the following code:
- Click Apply > Close > Save and close.