📍 Bolt Help / Integrations / Memberships & Loyalty / Connect Yotpo with Bolt
Connect Yotpo with Bolt
Learn how to connect Yotpo with Bolt.

Availability

Bolt supports Yotpo for BigCommerce and Bolt Checkout Custom Cart / Direct API.

Before You Start

Before following the Set Up instructions, prepare your Yotpo and Bolt Accounts by following the instructions below.

Step 1: Prepare Yotpo Account

  • Integrate your ecommerce store with Yotpo. See Yotpo’s implementation guide. Skip the Frontend Elements section.
  • Create a coupon for the customer to use. Bolt supports two coupon types:
    • Generic Variable
    • Generic Fixed Amount
  • Obtain your Yotpo API and GUID keys.

Step 2: Prepare Bolt Account

  • Build the Merchant Cart and Order API endpoints as part of your backend services.
  • Contact your Bolt Support representative and request they enable the following feature flags:
    • • Enable loyalty in checkout.
    • • Enable merchants to use separate endpoints for shipping calls and tax calls.
    • • Allow consumers to remove rewards (This allows customers to remove rewards at checkout).
  • Provide the Bolt representative with the following information:
    • • Yotpo API and GUID keys
    • • Type of coupon

Step 3: Continue to Setup

Now, you can continue to the set up guides for either Yotpo for BigCommerce or Yotpo for Bolt Checkout Custom Cart / Direct API.

Create Yotpo API Integration with Bolt

  1. Use the Bolt API to Create an Order Token for an order. To associate the customer with their Yotpo points balance, you must include the customer ID as the value for the platform_user_id in the request payload. The customer ID must be the same ID you use to sync customer data from Bolt to Yotpo.

Example POST

{
  "cart": {...},
  "user_note": "Happy Birthday to my best friend in the whole world. Enjoy!",
  "create_cart_on_merchant_backend": false,
  "metadata": {
    "encrypted_user_id": "{{USER ID}}"
  },
  "channel": "browser",
  "platform_user_id": "{{CUSTOMER_ID}}"
}
  1. Bolt will call your Merchant Callback API Update Cart method to sync the cart and verify the details of the reward. This call includes the loyalty_rewards_to_add object with the coupon details.

Example Request

{
  "event": "cart.update",
  "data": {
    "order_reference": "{{ORDER ID}}",
    "loyalty_rewards_to_add": {
       "source": "yotpo", // loyalty platform
       "type": "coupon",
       "coupon_code": "10OFF",
       "amount": 1000, // in cents
       "points": 1000, // customer used 1000 points to redeem reward
       "description": "$10 off (1000 points)",
       "details": {...} // encode redemption option response from Yotpo as JSON
     },
    "loyalty_rewards_to_remove": {
      }
    }
}

2a. Include loyalty_rewards_to_add as the loyalty_rewards object in your response to Bolt. We recommend sending the same payload:

Example Response

{
   "event": "cart.update",
   "status": "success",
   "data": {
       "order_create": {
           "external_inputs": null,
           "cart": {
             "total_amount": 5000,
             
             "loyalty_rewards": [
               {
                "source": "yotpo",
                "type": "coupon",
                "coupon_code": "10OFF",
                "amount": 1000, 
                "points": 1000, // customer used 1000 points to redeem reward
                "description": "$10 off (1000 points)",
                "details": {...} // encode redemption option response from Yotpo as JSON

               }
             ]
           },
           "user_note": "",
           "create_cart_on_merchant_backend": false,
           "metadata": null
         }
   }
}

2b. Bolt sends the loyalty_rewards_to_remove object to merchants for verification. Verify the contents and ensure the cart response does not contain this payload.

Example Request

{
  "event": "cart.update",
  "data": {
    "order_reference": "{{ORDER ID}}",
    "loyalty_rewards_to_remove": {
       "source": "yotpo", // loyalty platform
       "type": "coupon",
       "coupon_code": "10OFF",
       "amount": 1000, // in cents
       "points": 1000, // customer used 1000 points to redeem reward
       "description": "$10 off (1000 points)",
       "details": {...} // encode redemption option response from Yotpo as JSON
     },
    }
}

WARNING

If verification fails, send a 422 error response back to Bolt.

  1. Bolt will call your Merchant Order Create endpoint and include the loyalty_rewards and loyalty_rewards_amount objects in the payload.

Example Request

{
  "event": "order.create",
  "data": {
   "order":{
        "cart": {
             "id": {{CART ID}},
              …,
             "loyalty_rewards_amount":{
                 "amount": "{{AMOUNT}}",
                 "currency": "{{CURRENCY}}",
                 "currency_symbol":"{{SYMBOL}}"
              }
             "loyalty_rewards": [ {
                 "source": "yotpo", // loyalty platform
                 "type": "coupon",
                 "coupon_code": "10OFF",
                 "amount": 1000, // in cents
                 "points": 1000, // customer used 1000 points to redeem reward
                 "description": "$10 off (1000 points)",
                 "details": "{...}" // encode redemption option response from Yotpo as JSON
               } ],
           }
    }
}
}
  1. Once your service creates the Bolt order successfully, call the Yotpo Create Order endpoint, passing the coupon_code property. This final step ensures the discount is synced across Bolt and Yotpo.

Example request

{
    "customer_email": "john1@example.com",
    "total_amount_cents": "15000",
    "currency_code": "USD",
    "order_id": "testing1",
    "status":"paid",
    "created_at": "2019-05-25 20:59:53",
    "coupon_code": "10OFF", // coupon code from Bolt order
    "ip_address": "127.0.0.1",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36",
    "discount_amount_cents": "500",
    "items":
     [{
        "name":"Green Shirt",
        "price_cents":"1499",
        "vendor":"coolshirts,inc",
        "id":"472361372358",
        "type":"shirt",
        "quantity":2,
        "collections":"new_arrivals,new"
    }]
}

Setup Yotpo with BigCommerce

Use the steps below to enable Yopto with Bolt on BigCommerce.

  1. Install the Yotpo Loyalty and Referrals App on BigCommerce.
  2. Create a coupon for the customer to use. Bolt supports three coupon types:
    • • Fixed Amount
    • • Variable
    • • Store Credit Fixed Amount
  3. Contact your Bolt Support representative and request they enable the following feature flags:
    • • Enable loyalty in checkout
    • • Enable merchants to use separate endpoints for shipping calls and tax calls
    • • Allow consumers to remove rewards (Optional, this allows customers to remove rewards at checkout)
  4. Provide the Bolt representative with the following information:

Customer Behavior

The following table represents the Yotpo customer experience based on their logged-in status:

See earning potential Sign up for a loyalty account See existing point balance Redeem points
Guest (no SSO) Yes No N/A N/A
Guest (SSO enabled) Yes Yes N/A N/A
Bolt Guest & logged in to merchant store Yes N/A Yes Yes
Bolt shopper & Guest to merchant store (no SSO) Yes No N/A N/A
Bolt shopper & logged in to merchant store Yes N/A Yes Yes