This document provides details of what fabric Offers is, why it is so valuable, core concepts of fabric Offers including its features, and how to use Offers APIs with your storefront.
fabric Offers is a headless and holistic ecommerce solution for pricing and promotion tools. It enables merchants to create and manage a range of pricing strategies to increase their competitiveness in the market.
fabric Offers APIs are divided into two categories— Management APIs and Storefront APIs. Management APIs let merchants create prices, promotions, and coupons. Storefront APIs serve prices and promotions if the conditions are met.
- Management APIs: These APIs are supported by fabric’s Offers engine that lets merchants create prices, promotions, coupons, set conditions for offers to be applied, and set discount amounts. For details, see Offers v2 > API References > Management APIs from the left side navigation pane.
These APIs are supported by fabric’s Dynamic Pricing Engine which evaluates promotions, calculates prices in real-time for one or many items, and displays these prices on storefront sites. For details, see
Offers v2 > API References > Storefront APIs
from the left side navigation pane.
- Get Price: /price/get-by-sku (under Dynamic Pricing Engine) endpoint displays prices on your product details page. It considers all the active promotions and returns the original price that was set earlier along with the discounted prices of the product.
- Evaluate Promotions: This endpoint (/promo/evaluate-promotions) applies promotions to one or more items that exist in the cart if the conditions are met. For example:
- You may have promotions for specific items, for a minimum quantity of an item, or a combination of items to be purchased.
You may also create promotions that require a certain cart amount to be reached to get the discount. Request body contains all relevant information related to cart (items, quantities, customer type, and many more) to get all the applied discount amounts in the response. The cart repeats the process every time the contents change.
If an item is eligible for multiple promotions, promotions will be applied as per the priority order set. Each promotion type has an assigned priority which is configured by merchants during onboarding. Each promotion type can also be configured as stackable or non-stackable. Stackable promotion means discounts of all the stacked promotions will be summed together and the final discount will be applied. Non-stackable promotion means only the highest discounted amount will be applied for every priority.
Following is a flow-diagram that depicts how a price is calculated by fabric Offers.
The controls and automation provided with Offers will drastically reduce operational overhead and ensure that merchants can quickly react to their fast-changing environment.
Following are the key principles that drive fabric Offers:
- Headless: fabric Offers can be integrated with any ecommerce site.
- Holistic: fabric Offers provides both pricing and discounting tools.
- Modular: fabric Offers can be used as a standalone product or with fabric’s platform for faster implementation.
- Configurable: fabric Offers provides flexibility to configure defaults ad priorities.
- Operator first: fabric Offers has a simple design that makes it easier to use.
Following are some of the core concepts of fabric Offers:
A price list is a collection of items and their assigned prices. An item can exist in multiple price lists. This gives you the ability to assign different prices to same item. Price lists let you set currency and duration of the prices. For example, if the price list expires, the prices of the items within the price list will also expire.
When requesting prices or evaluating promotions, you should mention the price list ID that you want to use. You can configure the pricing API to include your default price list in all requests.
A promotion is a discount on an item, cart or shipping method based on set conditions. The evaluate promotions API (under Dynamic Pricing Engine) lets you submit a range of data that will be referenced against the conditions. Response will include the details of the promotions and discounts applied. This can be displayed on your storefront to help shoppers know that they are getting an expected discount. As promotions can be linked to specific price lists, it is important to submit the correct price list ID.
Customer segment is a group of customers who are given a unique reference to easily identify them. Customers may be grouped in a number of ways such as demographics, locations or device type. fabric Offers supports the assignment of a customer segment to a promotion so that the promotion is applied only to a specific group of customers. You must provide your customer segment IDs in the ‘Settings’ of the Copilot application.
Following are the pricing and promotion features of fabric Offers:
- Ability to schedule prices in future
- Ability to manage prices across price-lists
- Ability to link promotions to price-lists
- Allows to create coupons that can be applied to get promotions or discounts
- Supports both Business-to-Business (B2B) and Business-to-Customer (B2C) with the support of contract pricing for B2B.
Ability to perform the following promotion use cases:
- SKU based promotion: Amount off or % off on specific items
- Quantity based promotion: Amount off or % off on specific items that are purchased in a certain quantity
- Cart value based promotion: Amount off or % off on the total cart amount
- BuyGet promotion: Amount off or % off on specific items based on purchasing a specific bundle of items. For example, buy two shirts, and get one t-shirt free.
- SpendGet promotion: Amount off or % off on total cart amount based on the amount spent. For example, get a flat $500 off if cart amount is $5000 or more.
- Shipping promotion: Amount off or % off on shipping cost
- Coupon codes: Applying promotions only when a valid coupon code is submitted
- Ability to safeguard specific items against discounts (Global exclusions)
- Ability to link promotions to a customer segment (Segmentation)
For detailed information on promotion based use cases, see Developer Guide > Introduction to Promotions from the left-side navigation pane, and please visit fabric's knowledgebase.
- Product data: fabric Offers needs item name and item SKU for which you want to create price and discount details.
- Shipping methods: fabric Offers provides the ability to discount specific shipping methods. For example, you may want to provide free standard delivery but charge amount for next day delivery. Offers will need to know what shipping methods you will use. There is a configuration section in Settings where you can enter this information.
You must provide an access token while making an API request. If you don’t include your access token when making an API request, or use an incorrect or outdated one, fabric returns an error.
Your storefront consumes Offers components via REST APIs, which returns a JSON object with the attributes defined in the descriptor files mapped against the static content.
fabric Offers supports both Identity v1 and Identity v2 approaches of getting access tokens. Following Generate Authorization Token section is related to Identity v1 for generating merchant specific access tokens.
To know about Identity v2, see the knowledgebase article on fabric Authentication
- You can find your API tokens on the Copilot UI , Or
- You can use the Login API (/api-identity/auth/local/login) to generate an authorization token. For details, see Offers v1 > API References > Login API
To generate authorization token:
- Log in to Copilot with your fabric credentials.
- Navigate to Offers
- Right click, and then click Inspect .
- Navigate to Application tab.
, click the copilot URL, and find a value for
accessTokenvalue is the authorization token you must use while calling fabric Offers APIs.