Connect Yotpo with Bolt
Before You Start
Complete the steps below before proceeding with this guide.
Yotpo
- 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.
Bolt
- 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
Create Yotpo API Integration with Bolt
- 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}}"
}
- 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": {
}
}
}
a. 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
}
}
}
b. 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.
- Bolt will call your Merchant Order Create endpoint and include the
loyalty_rewards
andloyalty_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
} ],
}
}
}
}
- 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.
- Install the Yotpo Loyalty and Referrals App on BigCommerce.
- Create a coupon for the customer to use. Bolt supports three coupon types:
- • Fixed Amount
- • Variable
- • Store Credit Fixed Amount
- 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)
- Provide the Bolt representative with the following information:
- • Yotpo API and GUID keys
- • Coupon type
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 |