Skip to content

URL Arguments

These Smart Links rely on URL arguments in order to achieve a desired outcome. Some of the arguments are optional and some are required for the Smart Link to load in properly.

URL Beginning

All Smart Links must start with the example Protocol, Domain and Path where the Domain is the store that the this Smart Link is used for. Preceding the Domain must be the path of /apps/rebuy/cart.

https://{{my-store-domain.com}}/apps/rebuy/cart

// Example of the beginning URL
https://try.rebuyengine.com/apps/rebuy/cart

After this path then you can add in the desired arguments. Below is a basic example of adding one item to the cart and redirecting the customer to Shopify Checkout. Below we are specifying the variant ID to be added, the quantity of this variant and where we would like the customer to land once the logic has ran.

Try copying the below into a new tab and see what happens.

https://try.rebuyengine.com/apps/rebuy/cart?variants%5B42005931065577%5D%5Bquantity%5D=1&redirect=shopify_checkout
// Decoded URL example
https://try.rebuyengine.com/apps/rebuy/cart?
variants[42005931065577][quantity]=1
&redirect=shopify_checkout

Required Arguments

Argument Values Result
variants Array of comma separated integers. e.x. [123456, 7891011] The variant ID's that will be added to the cart.
quantity Integer e.x. 1 The quantity of the variant to be added.
redirect shopify_checkout, cart or recharge_checkout The page that the customer will land on once the logic has finished. *Will be

Optional Arguments

Arguments Values Result
clear_cart yes or no If yes, then any items in the customers cart will be removed. If no, then any items that may be in the customers cart will not be removed.
smart_cart_show yes or no If yes and the merchant has the Rebuy Smart Cart enabled then the Smart Cart will open once the customer has been redirected. *This only works on custom landing pages and the merchant must have the Smart Cart enabled. If no, the Smart Cart will not show once redirected.
discount String/text. E.x. 20OFF A discount code that will be applied once the logic has ran.
message String/text. E.x. "Thanks for shopping with us." A dismissible banner message that will appear at the top of the screen once the logic has ran.
landing_page shopify_checkout, cart, recharge_checkout or a subdomain such as /collections/all *Note: This will be released soon and will be taking place of the redirect argument, although we will still support the redirect argument. The location that the customer will be redirected to once the logic has ran.

Example

Below is an example with one product being added to cart, the cart being cleared of its original items, a custom page that the customer will land on, the Smart Cart opening once they get there and a dismissible banner message displaying and following them through their session. There are also product properties that are being added to these items which is a bit easier to see in the decoded example further below.

https://try.rebuyengine.com/apps/rebuy/cart?variants%5B42005931065577%5D%5Bquantity%5D=1&clear_cart=yes&message=Thanks%20for%20shopping%20with%20us%21&redirect=%2Fcollections%2Fall&landing_page=%2Fcollections%2Fall&smart_cart_show=yes
// URL decoded
https://try.rebuyengine.com/apps/rebuy/cart?
variants[42120411087081][properties][_attribution]=Rebuy Cart&
variants[42120411087081][properties][_widget_id]=37001&
variants[42120411087081][properties][_source]=Rebuy&
variants[42120411087081][quantity]=2&
variants[42005931065577][properties][_attribution]=Rebuy Permalink&
variants[42005931065577][properties][_source]=Rebuy&
variants[42005931065577][quantity]=1&
clear_cart=yes&
message=Thanks for shopping with us!&
redirect=/collections/all&
landing_page=/collections/all&
smart_cart_show=yes