Rekisteröi yritys

Storebadge technical integration

This document describes the technical integration of the Storebadge feedback service

Chapter 1. | Storebadge Sidebar

The Storebadge Sidebar is used to display your store rating and reviews on your website. The sidebar is easy to implemented, just place a script (below) in the master template before the closing </body> tag on your website.

You can adjust all settings and look and feel via the Storebadge admin.

Chapter 2. | Automated review service (API)

General

For our automated review service the merchant may send their transactions to our API. When sending orders to our API the merchant may choose the sender giving the merchants the option to send the invitation link themselfs.

Reference (a unique identifier for the order / transaction, normally order ID)

Email (the customers email address on the order)

Secret (md5 of string %customer_email%+%reference%+%store_secret%*)

Sender (send invitation yourself=client, storebadge sends=sb)

First name (The customers first name)

Last name (The customers last name)

* Available in your storebadge admin panel

Chapter 3. | Automated review service (order tracking script)

General

For our automated review service a tracking script needs to be implemented on the "success page" of your website. This is the page that loads when a customer has placed a successful order (and normally a successful payment). The tracking script (asynchronous loading) provides Storebadge with parts of the order information.

You will provided with a store name and a store secret after you complete the store configuration in the admin panel. The store name is defined as sb_store. in the script. The store secret shall be used to create an order secret (read below).

Generating order secret

An order secret shall defined for the variable sb_secret and needs to generated in the client application as md5(customer_email+order_id+store_secret) for each order.

About review invitation delay time

The value (numeric) of the review invitation delay time determines the number of days a review invitation shall be delayed counting from the timestamp on the order. The value can be set either via a global setting or per order, see below. It is recommended to set the review invitation delay so it is sent one or two days after the expected delivery of the order to the customer.

Global setting

Your store has a global invitation delay time setting in the Storebadge admin panel. This setting will apply for all orders unless a review invitation delay time has been set for a specific order (see below)

Order specific (optional)

By setting the delay time via the tracking script a higher accuracy can be achieved in the timing of review invitation emails. Invitation delay time set via the tracking script has a higher priority than the global store setting. There is also an option of just setting an invitation delay time on some orders via the tracking script and let the global store setting determine the invitation delay time of all other orders.

The variable for the invitation delay are defined as sb_delay where the pre-setting is set to false, setting invitation delay time to 1 day is achieved as sb_delay = '1';

Testmode

The varible sb_test can be used to test the integration by setting it to sb_test = 1;. Review invitation e-mails will be sent so ensure that you only use it for testorder(s) (your own email address). Note - You will not be able to submit a reviews for orders in testmode.

Datetime (Unix timestamp)

If you wish to implement the order tracking in a later stage, for example when orders are shipped you will need to use the sb_datetime varible to set the orderdate. If not set the datetime will be set as the date and time that Storebadge receives the order. Note -the format must be Unix timestamp

Chapter 3.1 | Platform extensions and apps

Storebadge offers extensions and apps for popular e-commerce platform. The extension/apps normally includes the basic Storebadge order tracking integration. Please read documentation for each extension for further details.