You may want to have your analytics information when you make pricing decisions. The number of times a product page was viewed, and the number of units that were sold can be transferred to the system.
How to send your analytics data
We offer two ways of integration:
You should choose the way that fits you the most. If you are debating which way to go, contact us.
Tip
We suggest updating your analytical data multiple times daily to ensure that the information remains current and readily available for use.
API integration
If it's the first time you are using the API please read our Getting started with API guide
To send your analytics data via API, use one of the following endpoints: either the 'impressions' endpoint or the 'behavioral' and 'daily_sales/transactional' data endpoints.
POST /api/v3/analytics/behavioral_data
This endpoint is designed to track product behavior on a daily basis. It is recommended to update each product in the system daily using this endpoint even if no change was made. This helps maintain a consistent and continuous data flow.
Required daily summary fields:
- client_key
- channel
- product_id - (you must ensure this identifier is globally unique and used by your clients when they use our SDK).
- date - in the format of YYYY-MM-DD.
- inventory - non-negative integer.
- cost1_avg_per_unit - greater than 0 number. Average cost 1 of the SKU for that day: e.g., current purchase price. This should represent the average cost for the day.
Constrains on daily summary optional fields:
- total_views_per_day - non-negative integer representing the total aggregated views of the product for a specific date.
- cost2_avg_per_unit - non-negative number. Average Cost 2 of the SKU for that day: e.g., logistic cost.
- avg_basket_position - non-negative number, less than 1000. Represents the stage at which the product was added.
- avg_traffic_cost - non-negative number.
- avg_traffic_share_seo - a number between 0 and 100. Indicates whether it arrived through a search engine.
- avg_traffic_share_sea - a number between 0 and 100.
- avg_traffic_share_pce - a number between 0 and 100.
- avg_conversion_rate - a number between 0 and 100. Transfer of views and conversion rate in percentages.
After that, we need your performance in the marketing. For it you have these two endpoints which overlap, so you should choose one to use, depending on the amount of information available to you:
POST /api/v3/analytics/transactional_data
If you have transaction-level data, it is recommended to use this endpoint to get the best models and results.
Required transaction fields:
- client_key
- channel
- product_id - you must ensure this identifier is globally unique and used by your clients when they use our SDK.
- transaction_timestamp - Represents when the transaction occurred, UTC time in the format of YYYY-MM-DDTHH:MM:SSZ. Example: "2024-10-21T15:04:05Z".
- shelf_price_incl_vat - non-negative number, The regular shelf price per unit includes VAT in the transaction (i.e. before promotions are applied).
- units_sold - non-negative integer.
- transaction_id - a unique value identifying a specific purchase transaction by a customer.
- transaction_price_incl_vat - non-negative number, The actual price per unit includes VAT in the transaction.
- vat - a whole number between 0 and 100.
- profit1_per_unit_excl_vat - The profit per unit excludes VAT in the transaction. should be less than the transaction price.
Constrains on transaction optional fields:
-
transaction_line_id - a unique identifier representing a specific line within a transaction.
Each product or set of products in a transaction is associated with its own line, which includes details like the product, quantity, and price.
For example, when making a purchase that includes multiple products, each product will be assigned to a separate transaction line.
This field uniquely identifies that line and allows tracking of the individual product or set of products, their prices,
and any related details specific to that line within the overall transaction. -
transaction_basket_position - non-negative integer, less than 1000.
POST /api/v3/analytics/daily_summary
This endpoint posts a daily summary of product-level sales analytics by aggregating transactions for each product.
Required daily sales summary fields:
- client_key
- channel
- product_id - (you must ensure this identifier is globally unique and used by your clients when they use our SDK).
- date - in the format of YYYY-MM-DD.
-
avg_shelf_price_incl_vat - greater than 0 number. Average regular shelf price per unit includes VAT that day.
(i.e. before promotions are applied). - avg_transaction_price_incl_vat - greater than 0 number. Average actual price per unit includes VAT that day.
- avg_vat - a number between 0 and 100.
- total_units_sold_per_day - greater than 0 number.
-
total_profit1_per_day_excl_vat - greater than 0 number. Total profit 1 excludes VAT for that day.
/api/v3/impressionsThe endpoint requires only one variable in addition to the usual qts, which is the body.
The body will contain the data we wish to update for each product in the array.
The required fields are:- product_id - The unique ID of your product on the system.
- client_key - The key of your system inside the quicklizard platform.
-
channel_key - For omnichannel clients only.
from&to - to time the period which the analytics relate to, the from and to are passed in the format of YYYY-MM-DDTHH:MM:SS.000Z
The analytical fields include:
revenue, profit, units, views, and conversions.
If the 'units' value is unknown, pass it as the same value as the 'conversions' value.
To read more about the endpoint please see our documentation here
Notes:
- The analytical data will be spread evenly over the times passed in the request.
- If you pass data on the same dates you already did, it will aggregate them to the already existing data, and not override the data.
- If you send conversions you must send the amount of units and the revenue and vice versa. that's why we recommend if you don't know the amount of units, send the same as conversions.
- Views are only applicable to online stores, and can be ignored otherwise. Don't send the views variable at all. if you send it with 0, the request will fail.
CSV Files
This option is easy to implement and can be aggregated on longer periods and easy to monitor backwards issue and restoring data when files are saved on our SFTP Server.
You have an example files at the end.
It should include the period, the product id on QL system, and the performance.
The file must be UTF-8 Encoded.
Server to server
This option gives you the most control over the data you send us.
You may send us product and payment confirmation events from your backend to our server-to-server SDK events API endpoint.
Please read all about the server-to-server implementation in our technical documentation.
Comments
0 comments
Please sign in to leave a comment.