URL Parameters Reference
Dynamic links allow you to personalize checkout experiences by passing URL parameters. Toggle on Dynamic to enable parameter processing for your link.
Line Items ?li=
Add products to the cart with optional selling plan and line item attributes.
?li=variantId,quantity,sellingPlanId,[key,value:key,value]
| Example | Description |
|---|---|
?li=12345,2 |
Add 2 units of variant 12345 |
?li=12345,2:67890,1 |
Add multiple products |
?li=12345,1,9251324219 |
Add with selling plan (subscription) |
?li=12345,2,[Gift,true] |
Add with line item attribute |
?li=12345,1,9251324219,[Gift,true:Message,Hello] |
Selling plan + multiple attributes |
Customer ID ?c=
Pre-fill checkout with a customer's saved details using their Shopify customer ID or Klaviyo profile ID.
?c=customerId
| Example | Description |
|---|---|
?c=7654321098765 |
Shopify customer ID |
?c=01KAMJGT9S99DT546Z2J6BVCP1 |
Klaviyo profile ID |
Inline Customer Data ?c=
Pre-fill checkout with customer data passed directly in the URL.
?c=[key,value:key,value]
| Example | Description |
|---|---|
?c=[email,[email protected]] |
Email only |
?c=[email,[email protected]:firstName,John:lastName,Smith] |
Email with name |
?c=[firstName,John:lastName,Smith:city,London:country,GB] |
Name and address |
Available fields:
| Field | Description |
|---|---|
email |
Customer email address |
phone |
Customer phone number |
firstName |
First name |
lastName |
Last name |
address1 |
Street address |
address2 |
Apartment, suite, etc. |
city |
City |
province |
State or province |
zip |
Postal or ZIP code |
country |
Country code (e.g., US, GB, CA) |
company |
Company name |
Cart Attributes ?attr=
Add custom attributes to the cart.
?attr=[key,value:key,value]
| Example | Description |
|---|---|
?attr=[Gift,true] |
Single attribute |
?attr=[Delivery-Date,2026-01-25] |
Date attribute |
?attr=[Gift,true:Message,Hello] |
Multiple attributes |
Cart Note ?note=
Add a note to the order.
?note=URL encoded text
| Example | Description |
|---|---|
?note=Please%20gift%20wrap |
Gift wrap request |
?note=Deliver%20after%205pm |
Delivery instructions |
?note=Leave%20at%20door |
Drop-off instructions |
Abandonment ?a=
Restore an abandoned cart using a Shopify abandonment ID.
?a=abandonmentId
Reorder Items
When Dynamic is enabled, a Reorder items checkbox appears in the Cart card. When checked, the link will automatically add items from the customer's previous order.
How it works:
- Enable Dynamic mode on your link
- Check "Reorder items" in the Cart card
- Pass a customer ID via
?c=parameter in the URL - The customer's most recent order items are automatically added to cart
Example URL:
https://yourstore.com/go/reorder?c=7654321098765
Combining Parameters
You can combine multiple parameters in a single URL:
https://yourstore.com/link?li=12345,1&c=7654321098765&attr=[Gift,true]¬e=Please%20gift%20wrap
Promotions & Security
How promotions work with dynamic links
Promotions are configured on the link itself, not in the URL. This means:
- Customers get the discount you configured
- Bad actors can't change or guess discount codes
- Your promotion rules always apply
- Line item discounts in URLs are ignored on dynamic links
Recommended: Use tiered promotions with caps
For dynamic links, we recommend setting a maximum discount value:
Tier 1: 10% off for carts $0-50
Tier 2: 15% off for carts $50-100
Maximum discount: $100
This limits exposure if someone adds unexpected items to the cart.
Need product-level restrictions?
If you need discounts to only apply to specific products:
- Create a discount code in Shopify with product/collection restrictions
- Add that discount code to your link in the Checkout Links UI
- Shopify enforces the restrictions automatically
Important Notes
Dynamic mode must be enabled
URL parameters are ignored unless you enable Dynamic Mode on the link. This is a security feature.
URL length limits
Most browsers support URLs up to 2,000 characters. For QR codes, keep URLs under 500 characters for easy scanning.
Tips for shorter URLs:
- Use
?c=with a Shopify Customer ID instead of full address fields - Create customers in Shopify first for returning buyers
- Keep cart attribute keys short
Analytics
Dynamic links track analytics the same as regular links. All clicks and orders roll up to the link you created.
Want granular tracking? Create separate links:
summer-campaign-emailfor email sendssummer-campaign-socialfor social postssummer-campaign-smsfor SMS
Each tracks separately, all can use dynamic parameters.