Using query parameters

You can provide users with quick access to the Web Shop functions by using query parameters in the website link. For example, when promoting a page on social media and in mass mailings. Such links will help you automatically authenticate users on the website or redirect them to purchase specific items.

Using query parameters, you can configure the following actions that will be performed when clicking on a link:

You can use multiple parameters in a single link, thus combining multiple functions.

Setting up authorization

Authorization via user ID

Use a link with a query parameter for automatic user authorization when navigating to the site. This option is suitable if your site is set up for authorization via User ID.

To automatically authenticate a user via User ID:

  1. Copy the link to the site.
  2. At the end of the link, add ?user-id=<UserID>, where <UserID> is the user ID to whom you are sending the link.
    Example: https://webshop-external-demo.xsollasitebuilder.com/?user-id=12345
  3. Send individual links to users.

After the user clicks on the link, they will be directed to the site and automatically authenticated.

Use a link with a query parameter for automatic user authorization when navigating to the site. This option is suitable if your site is set up for authentication via a deep link.

To automatically authenticate a user via a deep link:

  1. Copy the link to the site.
  2. At the end of the link, add ?deeplink=true.
    Example: https://webshop-external-demo.xsollasitebuilder.com/?deeplink=true
  3. Share the link in public materials or send individual links to users.

After the user clicks on the link, they will be directed to the site and automatically authenticated.

Setting up a transition to a item card

Use a link with a query parameter to redirect the user directly to the desired item when opening the site. For an unauthorized user, a card with information about the item specified in the query parameter will be opened. If the user is already logged in to the site, after clicking on the link, the payment interface for purchasing the product will open for them.

To direct a user to a specified item:

  1. Copy the link to the site.
  2. At the end of the link, add ?purchase-sku=<item SKU>, where <item SKU> is the SKU of the desired item.
    To find the SKU of a product (using a virtual item as an example):
    1. Go to the Publisher Account.
    2. In the side menu, click Store.
    3. In the Virtual items block, click Configure.
    4. Navigate to the group of items where the item is located.
    5. Copy the SKU from the line of the specific item below its name.
  3. Example: https://webshop-external-demo.xsollasitebuilder.com/?purchase-sku=giant
  4. Share the link in public materials or send individual links to users.

After the user clicks on the link, they will be directed to the website where the item card with detailed information about the item is displayed, or to the payment interface for purchasing the item. This depends on whether the user is authenticated on the site.

Setting up the transition to purchasing a product

Use a link with query parameters to redirect the user to the payment interface for purchasing the specific product when opening the site.

To set up:

  1. Copy the link to the website.
  2. Add one of the authentication parameters to the end of the link: ?user-id=<UserID> or ?deeplink=true.
  3. After the authentication parameter, add ?purchase-sku=<item SKU>, where <item SKU> is the SKU of the item.
    To find the SKU of a product (using a virtual item as an example):
    1. Go to the Publisher Account.
    2. In the side menu, click on Store.
    3. In the Virtual items block, click Configure.
    4. Navigate to the group of items where the item is located.
    5. Copy the SKU from the line of the specific item below its name.
    Example:https://webshop-external-demo.xsollasitebuilder.com/?user-id=12345&amp;purchase-sku=giant
  4. Share the link in public materials or send individual links to users.

Setting up the application of a promo code or coupon

Use a link with a query parameter to apply a promo code or coupon by the user. The code can be applied automatically after navigating to the website or by clicking the Redeem code button. You can also add parameters to the link for one of the authentication methods. To use a link with a code parameter, set up promo codes and coupons in the project.

Note
Only an authenticated user can apply the code. If the user is not logged in to the site, a modal window for authentication opens after clicking the link.
To apply the code:
  1. Copy the link to the site.
  2. At the end of the link, add one of the following query parameters:
    • ?redeem-code=<promo code> – for automatic code redemption
    • ?insert-code=<promo code> – for redemption upon button click.
    Instead of <promo code>, specify the promo code or coupon that was generated in the Publisher Account or that you have set yourself.
    If you want the user to be automatically authenticated on the site, add one of the authentication parameters before the code parameter in the link: ?user-id=<UserID> or ?deeplink=true.
    Example:https://webshop-external-demo.xsollasitebuilder.com/?user-id=12345&redeem-code=TESTCOUPON
  3. Share the link in public materials or send individual links to users.

After the authenticated user clicks on the link, they will be directed to the site, where the code will be activated automatically or the user will have the option to manually redeem the code.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: August 22, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!