Smart Links Overview
Overview¶
Smart Links create pre-built cart URLs that automatically add products, apply discounts, and redirect customers. Use them in email campaigns, landing pages, and promotional content.
Key Features¶
- Auto-add Products - Automatically add specific products to cart
- Discount Codes - Apply discount codes on arrival
- Custom Redirects - Send customers to checkout, cart, or any page
- Landing Messages - Display promotional dialogs on arrival
- Conditional Logic - Trigger based on cart subtotal thresholds
URL Structure¶
Smart Links use the promo URL parameter:
The promo key is generated when you create a Smart Link in the Rebuy Admin Dashboard.
URL Parameters¶
| Parameter | Description |
|---|---|
promo |
The Smart Link key (required) |
promo_clear |
Set to clear any active Smart Link session |
Use Cases¶
- Email Campaign
- Customer clicks link → products added to cart → redirected to checkout with discount applied.
- Homepage Bundle
- Embed link in a CTA button → customer clicks → bundle products added → Smart Cart opens with promotional message.
- Collection Promotion
- Link redirects to collection page → Smart Cart shows added items → banner displays discount message.
JavaScript Access¶
Access the active Smart Link via JavaScript:
// Check if a Smart Link is active
if (Rebuy.SmartLink && Rebuy.SmartLink.key) {
console.log('Active promo:', Rebuy.SmartLink.key);
}
// Get Smart Link settings
const settings = Rebuy.SmartLink?.settings;
if (settings) {
console.log('Promo status:', settings.status);
console.log('Promo items:', settings.items);
}
// Clear the active Smart Link
Rebuy.SmartLink?.destroy();
Properties¶
| Property | Type | Description |
|---|---|---|
key |
string | The promo key from the URL |
settings |
object | Configuration from Rebuy Admin |
status |
string | Current status (ready, initializing, adding) |
Creating Smart Links¶
Smart Links are created and configured in the Rebuy Admin Dashboard. For detailed setup instructions, see Using Rebuy's Smart Links.
--- title: Smart Links excerpt: Create pre-built cart URLs for email campaigns and promotions deprecated: false hidden: false metadata: title: '' description: '' robots: index next: description: '' --- ## Overview Smart Links create pre-built cart URLs that automatically add products, apply discounts, and redirect customers. Use them in email campaigns, landing pages, and promotional content. ### Key Features - **Auto-add Products** - Automatically add specific products to cart - **Discount Codes** - Apply discount codes on arrival - **Custom Redirects** - Send customers to checkout, cart, or any page - **Landing Messages** - Display promotional dialogs on arrival - **Conditional Logic** - Trigger based on cart subtotal thresholds ## URL Structure Smart Links use the `promo` URL parameter: ```text https://your-store.myshopify.com/?promo=YOUR_PROMO_KEY ``` The promo key is generated when you create a Smart Link in the Rebuy Admin Dashboard. ### URL Parameters | Parameter | Description | |-----------|-------------| | `promo` | The Smart Link key (required) | | `promo_clear` | Set to clear any active Smart Link session | ## Use Cases **Email Campaign** : Customer clicks link → products added to cart → redirected to checkout with discount applied. **Homepage Bundle** : Embed link in a CTA button → customer clicks → bundle products added → Smart Cart opens with promotional message. **Collection Promotion** : Link redirects to collection page → Smart Cart shows added items → banner displays discount message. ## JavaScript Access Access the active Smart Link via JavaScript: ```javascript // Check if a Smart Link is active if (Rebuy.SmartLink && Rebuy.SmartLink.key) { console.log('Active promo:', Rebuy.SmartLink.key); } // Get Smart Link settings const settings = Rebuy.SmartLink?.settings; if (settings) { console.log('Promo status:', settings.status); console.log('Promo items:', settings.items); } // Clear the active Smart Link Rebuy.SmartLink?.destroy(); ``` ### Properties | Property | Type | Description | |----------|------|-------------| | `key` | string | The promo key from the URL | | `settings` | object | Configuration from Rebuy Admin | | `status` | string | Current status (`ready`, `initializing`, `adding`) | ## Creating Smart Links Smart Links are created and configured in the Rebuy Admin Dashboard. For detailed setup instructions, see [Using Rebuy's Smart Links](https://help.rebuyengine.com/en/articles/6197419-using-rebuy-s-smart-links).  <!-- Source: onsite-js/src/onsite/js/modules/SmartLink/SmartLink.js -->
See something that needs updating?
Suggest an edit
