INTEGRATION WITH BOGOS JS/SDK

This page provides an overview of the key requirements for integration with the BOGOS app via the BOGOS JS/SDK. It is recommended to read this page thoroughly before proceeding to the next sections

chevron-rightπŸ”” New Updatehashtag

1. Requirements

circle-info

If you need integration in a development environment, contact BOGOS via live chat or email at help@bogos.io

2. Installation

Version source

  BOGOS_JS_SDK=https://cdn.bogos.io/bogos-app-ext/20260309-1773072681/core.min.js

Step 1: Getting started

  1. Add the following script to your project:

    Property

    Description

    Example

    VERSION_SOURCE: String!

    The script URL for the current version

    https://cdn.bogos.io/{{version}}/core.min.js

    PUBLIC_STOREFRONT_API_TOKEN: String!

    abcd...

    PUBLIC_STOREFRONT_API_VERSION: String!

    2025-04

    MYSHOPIFY_DOMAIN: String!

    Myshopify domainarrow-up-right (found in Shopify Admin > Settings)

    bogos.myshopify.com

    πŸ’‘ Example Available πŸ‘‰ root.tsxarrow-up-right

  2. Update your project with the required BOGOS data:

    Note:

    πŸ’‘ Example Available πŸ‘‰ root.tsxarrow-up-right πŸ‘‰ Layout.tsxarrow-up-right πŸ‘‰ Cart.tsxarrow-up-right

Step 2: Gift Offer

  1. Trigger the gift logic whenever the cart is updated:

    Note:

    • If you provide the full Cart, it won’t fetch again.

    • If only the Cart ID is provided, it will fetch again.

    πŸ’‘ Example Available πŸ‘‰ Cart.tsxarrow-up-right

  2. Add prepareCheckout to your checkout process to validate gift items before proceeding to checkout:

    πŸ’‘ Example Available πŸ‘‰ Cart.tsxarrow-up-right

  3. Customize

    3.1. Gift Icon & Gift thumbnail

    • On the product page Add class "fg-secomapp-product-title" where you want to display gift icon Add class "bogos-gift-thumbnail-view" where you want to display gift thumbnail

    or

    πŸ’‘ Example Available πŸ‘‰ products.$handle.tsxarrow-up-right

    • For collection page Add class "fg-secomapp-collection-img" to where you want to display gift icon on product card

    πŸ’‘ Example Available πŸ‘‰ collections.$handle.tsxarrow-up-right

    3.2. Cart message

    Add the class "bogos-cart-message-view" to the element where you want the message displayed

    3.3. Gift slider

    To embed the gift slider instead of displaying as a popup, include the following code:

Step 3: Bundle Offer

  1. Classic bundle

    Add the following element to where you want to display the bundle offer.

    Dispatch this element to render the bundle offer

    or

    πŸ’‘ Example Available πŸ‘‰ products.$handle.tsxarrow-up-right

  2. Mix-match

    Add the following element to where you want to display the bundle offer.

    Dispatch this element to show bundle offer

    or

    πŸ’‘ Example Available πŸ‘‰ products.$handle.tsxarrow-up-right

Step 4: Bundle Page

Add the following element to where you want to display the bundle offer.

Dispatch this element to render the bundle offer.

πŸ’‘ Example Available πŸ‘‰ bundle-page.$id.tsxarrow-up-right

Step 5: Upsell Offer

  1. Frequently Bought Together (FBT)

    Add the following element to where you want to display the upsell offer

    Dispatch this element to render the upsell offer

    πŸ’‘ Example Available πŸ‘‰ products.$handle.tsxarrow-up-right

Step 6: Discount Offer

  1. Volume Discount

    Add the following element to where you want to display the discount offer

    Dispatch this element to render the discount offer

    or

    πŸ’‘ Example Available πŸ‘‰ products.$handle.tsxarrow-up-right

Step 7: Booster

  1. Progressing bar

    Add the following element to where you want to display the progressing bar

    Dispatch this element to render the progressing bar

    πŸ’‘ Example Available πŸ‘‰ Cart.tsxarrow-up-right

  2. Today offer

    Add the following element to where you want to display the today offer block

    Dispatch this element to render the today offer block and today offer widget

    πŸ’‘ Example Available πŸ‘‰ _index.tsxarrow-up-right πŸ‘‰ Cart.tsxarrow-up-right

3. Other integrations

3. 1. Hide gift product (cloned product)

  • For collection and product page, you can import checkItemIsGift and use returned value to skip gift products or replace to other pages

πŸ’‘ Example Available πŸ‘‰ collections.$handle.tsxarrow-up-right πŸ‘‰ products.$handle.tsxarrow-up-right

3.2. Customize gift popup/slider

  • Hide all default gift slider elements, and override with your custom implementation.

3.3. Details of additional event listeners

  • fg-gifts:updated: Event gift is updated in cart

πŸ’‘ Example Available πŸ‘‰ Layout.tsxarrow-up-right

  • fg-cart:auto-updated: Event gift auto add

  • fg-gifts:gift-icon: Show gift icons

  • bogos:message: Show cart message

4. Note

circle-info

For deeper customization, please contact our support team via live chat or email - help@bogos.ioenvelope

4.1. Publish Gift/Cloned Products

  • After creating or editing an offer, ensure that the gift/cloned product is published to your Headless channel (or any channel where you want BOGOS to run).

4.2. Some features are not yet available in this version

  • Draft-Order API

  • Market

  • Bundle page button block

  • Some Shopify object-based params (if only id provided, BOGOS will fetch the rest).

Last updated