Integrating custom platforms with Remarkety

You can use Remarkety as a standalone platform and run campaigns without integrating your system. However, in order to run data-driven campaigns, automations, and triggered campaigns that are based on shopping behavior, Remarkety will need access to your store's data. This will allow Remarkety to analyze your data, monitor conversion results and run the campaigns.

If you are using a standard e-commerce platform, we probably already have a plugin ready for you to use - just search for Remarkety in your platform's app store. If you have a custom platform, you may need to implement the following API integration which is made up of different types of data points.

How to integrate with Remarkety

Remarkety should have access to the following data on your store:

  • Products catalog
  • Orders
  • Customers
  • Carts
  • Website (client-side) events

There are multiple ways to send the information of each data type to Remarkety. We now are going to recommend how to do this for each type of data, but if the described method does not work for your specific use-case, our support team can help you understand how to do it best.

Products Catalog

You can use the products feed integration for a fast and easy daily upload of your catalog to Remarkety.

https://support.remarkety.com/hc/en-us/articles/360026179071-Google-Product-Feed-API

Orders

Use server-to-server webhooks to send us new orders. Please take a look on the retry notice.

General instructions about sending webhooks to Remarkety can be found here -
http://docs-api-v1.remarkety.com/?php#server-side-api

Detailed description of the orders webhooks JSON structure can be found here - 
http://docs-api-v1.remarkety.com/?php#orders-create

A few notes about the orders JSON:

  • In “line_items” the product id/sku should match a product from the products feed, otherwise a new product is created as “disabled” in Remarkety.
  • Customer information (id/email) should match an existing customer, otherwise a new customer record is created based on this data.

If you want to provide a one-time orders history import, we recommend doing it using a CSV file import. Once you have the file ready, please contact support for details about importing it.

The file format is described here -
https://support.remarkety.com/hc/en-us/articles/360038208752-Importing-Orders-into-Remarkety-using-SFTP

Customers

Use server-to-server webhooks to update Remarkety once new customers created or existing customers are updated on the store. Please take a look on the retry notice.

General information about sending server webhooks can be found here - http://docs-api-v1.remarkety.com/?php#server-side-api

Detailed description of the customers webhooks JSON structure can be found here -
http://docs-api-v1.remarkety.com/?php#customers-create

Pay attention to the following fields:

  • id - (a unique field in Remarkety and should be consistent across all webhooks related to this customer).
  • accepts_marketing - boolean indicates whether the customer wants to receive marketing emails or not. Can be “null” for unknown.

Important note about retrying webhooks

From time to time, it is possible that our webhooks endpoint server will not be accessible due to temporary issues, or a network issue on your website server.

It is important that you log any issue and have a retry mechanism to re-send the webhook to Remarkety in the case that Remarkety’s endpoint does not respond with HTTP 200 status code.

Carts and other client-side information

  1. Base JavaScript snippet -
    All website pages should have the basic JS snippet with the correct store id parameter (taken from the Remarkety account), as described here -
    http://docs-api-v1.remarkety.com/?javascript#client-side-api
  2. Identifying customers to the client-side script
    Should be simple as this (when the user is logged in, or entering the email address during the checkout process):
    var _rmData = _rmData || [];
    //Identify using email address
    _rmData.push(['setCustomer', '<CUSTOMER_EMAIL>']);
    More variations of this snippet (for example, adding marketing preference of the customer) can be found here:
    http://docs-api-v1.remarkety.com/?javascript#identifying-visitors
  3. Cart events
    When the customer is viewing the cart screen, adding/removing a product from the cart or on the checkout page, you need to send us the cart content.
    The JS line is this:
    _rmData.push(['track', 'carts/update', data]);
    The data variable should be populated with the cart content as described here-
    http://docs-api-v1.remarkety.com/?javascript#carts-create
  4. Product views
    On every product page, place the following JS snippet:
    _rmData.push(['productView', {
      productId: PRODUCT_ID,
      productName: PRODUCT_NAME,
      productCategoriesIds: PRODUCT_CATEGORIES_ID_ARRAY,
      productCategories: PRODUCT_CATEGORIES_ARRAY
    }]);
    The PRODUCT_ID parameter should match the product id from the Products Feed.
  5. Optional events
    1. Category view
      _rmData.push([
      'track',
      'categoryView',
      {
      category_id: category_id,
      category_name: category_name
      }
      ]);
    2. Site search
      _rmData.push(['track', 'siteSearch', {
      search_keyword: search_keyword,
      products: array_of_products
      }]);

      The array_of_products parameter should contain an array of products with useful information of your choice (price, title, id, image-url, any property that could use the marketer when adding a “Site search” campaign).

Coupons API

This API should be implemented on your end in order to support Remarkety’s Personalized Coupons mechanism.

See the discounts endpoint in this Swagger file (other endpoints should not be implemented)  - 

http://static.remarkety.com.s3-website-us-east-1.amazonaws.com/api-docs/#!/Discounts/post_discounts

You should provide us the Rest API base url, for example:
https://www.yourstore.com/api/remarkety/discounts

And also an API Key we should use when calling the API endpoint (we will pass it in the query string as remarkety_api_key.

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.