E-commerce integration guide

This section provides an introduction to working with Optimizely Campaign, and integrations with e-commerce systems.

Using Optimizely Campaign, you can register advertising consents for receiving newsletters in your e-commerce system, send transactional mailsAn email triggered by a recipient action (such as an order or purchase) or event (such as an anniversary). It is sent out subsequent to the event., and import product data and use it for mailings.

Using the HTTP API

Optimizely Campaign's HTTP API provides all the functionality needed to manage opt-ins and send transactional mails. You can trigger double opt-in processesA practice in which a recipient consents to receiving email from the sender before any promotional email is sent. Recipients receive an email with a double opt-in link, which they must click to confirm their interest., uptdate data in a recipient list, remove a recipient from a list and send transactional mails.

Clients and recipient lists

An Optimizely Campaign clientThe working environment of Optimizely Campaign. A client is a stand-alone and closed system that serves to organize your mailings. Campaign users can use one or more clients for your scenario. can contain one or more recipient lists which you use to store recipient data and for transactional mails.

Contact customer support for the setup and configuration of recipient lists.

You can use the HTTP API to manage recipients; add recipient data to a recipient list, update and remove recipients from the list. You can retrieve values of the recipient list fields, such as first name and last name, using field functions and use them in mailings. You can use field functions to personalize your mailings; Hello { salutation} {surname} becomes for example Hello Mrs. Miller.

In addition to recipient lists, a client can contain mailing templates which are used for the mailing design. A client is also used to handle opt-in and opt-out processes.

Accessing the HTTP API

You access the HTTP API via the endpoint api.campaign.episerver.net/. In the developer documentation of the HTTP API on Optimizely World, in the Basics section under Formatting rules, you can find information about the valid number and date formats.

You usually request the API with a program or via a program library such as cURL. For testing, you can also enter the API request directly in the address line of your web browser. You use the POST method to send data and the GET method to retrieve data.

A complete API request has the following structure:


  • Service. Use the form and mail services to connect shop systems and manage profile data. See Services and operations on Optimizely World.
  • AuthorizationCode. Use the authorization code to authorize access to the API and the recipient list associated with the code. To see the authorization codes of your recipient lists, open the Optimizely Campaign menu and select Administration > API Overview > Recipient lists.
  • Operation. Specify which action the API request should trigger. For example, subscribe is used to make a subscription and trigger an opt-in process. With sendtransactionmail you send a transactional mail.
  • Parameter. You must specify the parameters of the API request correctly. Besides the parameters that are mandatory for the operation, such as bmRecipientId for the subscribe operation, you can also specify the names of recipient list fields, for example lastname=Meier.

The HTTP API uses ISO-8859-1 encoding by default. You can change the encoding by assigning the value utf-8 to the bmEncoding parameter.

For testing you can use the nop operation. The nop operation only accepts parameters, but does not perform any action. You can use the following request to test the network connection between the shop or test system and Optimizely Campaign:


Information in the API overview

You can find the information required to use the HTTP API in the API overview.

  • Recipient list ID. Open the Optimizely Campaign menu and select Administration > API Overview > Recipient lists.
  • AuthorizationCode. Open the menu and select Administration > API Overview > Recipient lists. Select a recipient list and click Manage authorization codes.
  • Client ID. Open the menu and select Administration > API Overview > REST API.
  • Opt-In-Prozess-ID (bmOptinId). Open the menu and select Administration > API Overview > Opt-in processes.