Skip to content

Cookbooks ​

Ready to get started with the implementation, but not sure what actions you need?

In the following, you can see the cookbooks for the different actions you need to implement to get up and running.

It is expected that the Import of products is done, as all actions rely on Sprii knowing your products.

Use caseScript
Social checkout onlyGeneric or per-integration checkout script from Sprii
Any onsite or B2B use case belowwidget-<pageId>.js
Completed order reportingYour backend calls processOrders; see Order tracking

Register handlers before loading the selected script; see SDK setup.

Social media live shopping ​

To be able to use Sprii for social media live shopping, you need to implement these actions:

ActionsDescription
SOME_CHECKOUTPopulate your website's cart from a social media checkout.
OPEN_CART (optional)Open the cart as a fallback when the checkout link supplies neither a mini-cart action nor a redirect URL.

Onsite with product redirect ​

You want to do live shopping directly on your website, using the Sprii player with no basket integration but only linking to products.

Besides implementing the following actions, you also need to have a look at the galleries section.

ActionsDescription
GET_PRODUCT_REDIRECT_URL (optional)In case the link to the product requires some special logic, e.g., a country code based on the user, then you need to implement this action.

Onsite with basket integration ​

Live shopping with an integrated basket. With this setup, the basket content of your e-commerce store is fully synced with the basket inside the player.

Besides implementing the following actions, you also need to have a look at the galleries section.

ActionsDescription
UPDATE_CART_CONTENTSWhen a user adds, removes, or updates a product from the player, this action is called.
GET_CART_CONTENTSInform the player about the products currently in the customer's basket.
OPEN_CARTTriggered when the user wants to open the checkout.

Implement REFRESH_MINICART to update the shop header after basket changes without reloading the page when the player closes.

B2B live shopping ​

Often when doing B2B live shopping, each customer has different prices, currencies and languages. To be able to support this, we must do hydration. The following actions are needed to achieve this

ActionsDescription
GET_PRODUCT_DATA_LISTGet information about products, based on the current user
GET_USER_DATAGet information about the current user, including currency code and locale