# ERP Integration
This guide will walk you through the steps required to integrate Quicklizard into your ERP using our REST API.
During the implementation of Quicklizard for the purpose of dynamically changing prices, integration to ERP (or another backend system) serves three main objectives:
- Enrich product data with additional attributes that are not available on the product page.
- Read accepted price recommendations from Quicklizard and update them on your backend system and storefront.
- Enable or disable products on Quicklizard’s catalog, depending on their competitor mapping availability, which affects the availability price recommendations
To successfully and accurately generate dynamic price recommendations, Quicklizard uses data from your storefront and ERP or backend system that can be divided as follows:
Data item | Used in | Source |
---|---|---|
Shelf Price | Pricing rule | SDK / API |
Sale price | Product BI & Analytics | SDK |
Cost | Pricing limits | API |
Inventory Level | Pricing limits | API |
Product attributes | Competitor matching | SDK / API |
# Workflow
Typically, ERP integration involves a cycle of reading accepted price recommendations from Quicklizard into your ERP and storefront, and sending updates on shelf prices, cost and inventory levels back to Quicklizard using our REST API.
Due to the sensitivity of your data, Quicklizard will never make changes to your shelf prices, cost and inventory - It is your responsibility to pull any relevant data from Quicklizard, feed it into your internal system, and push any updates to Quicklizard when relevant.
# Products Catalog Sync
Typically, Quicklizard will use data sent to us from the SDK embedded in your storefront to create new products on our system. However, some product information, such as product cost and inventory level, and in some cases, product attributes, cannot be sent via the SDK, either due to its availability on your storefront, or because it's too sensitive to send via the SDK.
Our REST API provides two endpoints that allow you sync data from your ERP into Quicklizard:
# Bulk Create
Use this endpoint to create new products in case creating them via the SDK is not applicable. Please note that new products must include the following fields: client_uid, price, label, meta.permalink
# Bulk update
Use this endpoint to send us updates on shelf prices, cost, inventory levels, VAT and any additional attributes, whenever new information is available.
Please note that the bulk update API should be called only when you have new information to update, and that your request payload should only include new information. Do not use the bulk update API blindly to send us information that has'nt changed.
# Automating Price Changes
# Step 1 - Accepting Recommendations
The Quicklizard Pricing Engine generates price recommendations based on rules you define in our UI. New recommendations are available on the Products page, and can be accepted either manually, by checking the "Accept Recommendation" checkbox next to the recommended price, or automatically by turning on the “Accept recommended price automatically” option for a particular pricing group.
Optionally, you may manually edit a recommendation and override the price recommended by our engine, specifying how long your edit is valid for.
Any price recommendations accepted or edited by you or your team are considered as "accepted" and become available for consumption via our REST API under the GET /api/v2/products/confirmed
API endpoint.
Please note that price recommendations remain in their "accepted" state under the following conditions:
- Accepted Recommendations - until a new recommendation with a different price than the one accepted by you or your team is available.
- Manual price edits - until the edit expires as specified by the editor.
# Step 2 - Feeding Accepted Recommendations into your ERP
Using our REST API, you may now issue periodical API calls to the GET /api/v2/products/confirmed
API endpoint, and grab the prices.final
field from each product object of the response. This field contains the price recommended by Quicklizard and accepted by you or your team, and should be saved into your ERP as the product's new shelf (sale) price.
We recommend issuing a request to the /api/v2/products/confirmed
endpoint every 10 minutes with a period parameter of 10.mins
which tells the API to fetch recommendations that were accepted or edited in the past 10 minutes.
The complete API request path is /api/v2/products/confirmed?period=10.mins
# Pagination
Depending on the number of accepted recommendations available for a given period, you may have to paginate through the results. We recommend reading up to 100 results per page to avoid too-large response bodies.
To paginate through the results of your API calls, please add the page and per_page parameters as follows: /api/v2/products/confirmed?period=10.mins&page=1&per_page=100
(change the values of the page
and per_page
parameters to suit your implementation).
# Step 3 - Pushing Changes back to Quicklizard
After fetching accepted recommendations from our API as explained above, and saving them into your ERP, you now have to push these changes to Quicklizard using our bulk update API, available on the PUT /api/v2/products/bulk_update
endpoint.
You should use the bulk update API to send us updates on any product that was updated in your ERP, along with its new shelf price (which is the price recommendation accepted by you or your team), as well as cost and inventory level if they changed.
# Use Case
Typically, ERP integration involves a cycle of reading accepted price recommendations from Quicklizard, and sending updates on shelf prices, cost and inventory levels to Quicklizard.
Due to the sensitivity of your data, Quicklizard will never make changes to your shelf prices, cost and inventory - It is your responsibility to pull any relevant data from Quicklizard, feed it into your internal system, and push any updates to Quicklizard when relevant.
# Step 1 - Accepting Recommendations
The Quicklizard Pricing Engine generates price recommendations based on rules you define in our UI. New recommendations are available on the Products page, and can be accepted by checking the "Accept Recommendation" checkbox next to the recommended price.
Optionally, you may manually edit a recommendation and override the price recommended by our engine, specifying how long your edit is valid for.
Any price recommendations accepted or edited by you or your team are considered as "accepted" and become available
for consumption via our REST API under the GET /api/v2/products/confirmed
API endpoint.
# Step 2 - Feeding Accepted Recommendations into your ERP
Using our REST API, you may now issue periodical API calls to the GET /api/v2/products/confirmed
API endpoint, and grab
the prices.final
field from each product
object of the response. This field contains the price recommended by Quicklizard
and accepted by you or your team, and should be saved into your ERP as the product's new shelf price.
We recommend issuing a request to the /api/v2/products/confirmed
endpoint every 10 minutes with a period
parameter of 10.mins
which tells the API to fetch recommendations that were accepted or edited in the past 10 minutes.
The complete API request path is /api/v2/products/confirmed?period=10.mins
# Pagination
Depending on the number of accepted recommendations available for a given period, you may have to paginate through the results. We recommend reading up to 100 results per page to avoid too-large response bodies.
To paginate through the results of your API calls, please add the page
and per_page
parameters as follows:
/api/v2/products/confirmed?period=10.mins&page=1&per_page=100
(change the values of the page
and per_page
parameters to suit your implementation).
# Step 3 - Pushing Changes back to Quicklizard
After fetching accepted recommendations from our API as explained above, and saving them into your ERP, you now have to
push these changes to Quicklizard using our bulk update API, available on the PUT /api/v2/products/bulk_update
endpoint.
You should use the bulk update API to send us updates on any product that was updated in your ERP, along with its new shelf price (which is the price recommendation accepted by you or your team), as well as cost and inventory level if they changed.
# Step 4 - Enabling or disabling products
You may mark products available on Quicklizard as enabled or disabled, based on their status in your ERP. For example, products that are no longer sold, or should not be processed by Quicklizard’s pricing engine, can be marked as disabled, and can be re-enabled if and when relevant.
Updating your products enabled / disabled status is done via our bulk update API endpoint, where for each processed product, the "disabled" field should be set to 0 or 1 for enabled or disabled respectively.