← Dynamic links

URL Parameters Reference

This page documents all URL parameters available for dynamic links.

Line Items (li)

Add products to the cart using variant IDs.

Format:

?li=VARIANT_ID:QUANTITY

Multiple items (comma-separated):

?li=VARIANT_ID_1:QUANTITY_1,VARIANT_ID_2:QUANTITY_2

With selling plan (for subscriptions):

?li=VARIANT_ID:QUANTITY:SELLING_PLAN_ID

With attributes (in brackets, multiple separated by colon):

?li=VARIANT_ID:QUANTITY[KEY,VALUE:KEY,VALUE]

Examples:

?li=12345678:1 ?li=12345678:2,87654321:1 ?li=12345678:1:99999999 ?li=12345678:1[gift_message,Happy Birthday]

Customer (c)

Pre-fill customer information at checkout.

Customer shortcode (recommended):

?c=CUSTOMER_SHORTCODE

Every customer has a 10-character shortcode, an encrypted form of their customer ID. In Klaviyo it’s {{ person.checkout_links_shortcode }}, and the link editor shows each customer’s personal link.

A plain Shopify customer ID (?c=7654321098765) fills the cart only. On a reorder link it adds the customer’s last order, and on an abandoned cart link it adds their abandoned cart and its discount codes. It doesn’t fill in their email, phone, name or address, because an ID isn’t secret and anyone who has it could open the link. Use the shortcode to pre-fill those too.

Klaviyo Customer ID:

?c=klaviyo:KLAVIYO_PROFILE_ID

Inline customer data:

?c=[email,john@example.com:firstName,John:lastName,Doe]

Available inline fields:

  • email

  • firstName

  • lastName

  • address1

  • address2

  • city

  • province (state/province code)

  • zip

  • country (country code)

  • phone

Example with full address:

?c=[email,john@example.com:firstName,John:lastName,Doe:address1,123 Main St:city,New York:province,NY:zip,10001:country,US]

Cart Attributes (attr)

Attach key-value pairs to the order.

Format:

?attr=[KEY,VALUE]

Multiple attributes (comma-separated):

?attr=[KEY_1,VALUE_1:KEY_2,VALUE_2]

Example:

?attr=[source,instagram:campaign,spring2026]

Cart Note (note)

Add a note to the order.

Format:

?note=Your note text here

Example:

?note=Gift order - please wrap

Combining Parameters

You can combine any parameters using &:

?li=12345678:2&c=[email,john@example.com]&attr=[source,email]&note=Reorder

URL Encoding

Remember to URL-encode special characters in your parameter values:

Character

Encoded

Space

%20 or +

@

%40

&

%26

=

%3D

,

%2C

Most email and SMS platforms handle URL encoding automatically when using merge tags.

Didn't answer your question? Email us and a human answers.