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:
- Automatic authentication using the user ID or deep link.
- Redirecting to the card of a specific product. If the user is already logged in to the site, they will proceed to purchase the product.
- Opening the payment interface for purchasing the product. With this link, the user will also be automatically logged in to the site.
- Automatically applying a promo code to the catalog or redeeming a coupon with a reward.
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:
- Copy the link to the site.
- At the end of the link, add
, where?user-id=<UserID>
is the user ID to whom you are sending the link.<UserID>
Example:https://webshop-external-demo.xsollasitebuilder.com/?user-id=12345
- Send individual links to users.
After the user clicks on the link, they will be directed to the site and automatically authenticated.
Authorization via deep link
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:
- Copy the link to the site.
- At the end of the link, add
.?deeplink=true
Example:https://webshop-external-demo.xsollasitebuilder.com/?deeplink=true
- 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:
- Copy the link to the site.
- At the end of the link, add
, where?purchase-sku=<item SKU>
is the SKU of the desired item.<item SKU>
To find the SKU of a product (using a virtual item as an example):- Go to the Publisher Account.
- In the side menu, click Store.
- In the Virtual items block, click Configure.
- Navigate to the group of items where the item is located.
- Copy the SKU from the line of the specific item below its name.
Example: - Share the link in public materials or send individual links to users.
https://webshop-external-demo.xsollasitebuilder.com/?purchase-sku=giant
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:
- Copy the link to the website.
- Add one of the authentication parameters to the end of the link:
or?user-id=<UserID>
.?deeplink=true
- After the authentication parameter, add
, where?purchase-sku=<item SKU>
is the SKU of the item.<item SKU>
To find the SKU of a product (using a virtual item as an example):- Go to the Publisher Account.
- In the side menu, click on Store.
- In the Virtual items block, click Configure.
- Navigate to the group of items where the item is located.
- Copy the SKU from the line of the specific item below its name.
https://webshop-external-demo.xsollasitebuilder.com/?user-id=12345&purchase-sku=giant
- 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.
- Copy the link to the site.
- At the end of the link, add one of the following query parameters:
– for automatic code redemption?redeem-code=<promo code>
– for redemption upon button click.?insert-code=<promo code>
, specify the promo code or coupon that was generated in the Publisher Account or that you have set yourself.<promo code>
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: or?user-id=<UserID>
.?deeplink=true
Example:https://webshop-external-demo.xsollasitebuilder.com/?user-id=12345&redeem-code=TESTCOUPON
- 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.
Found a typo or other text error? Select the text and press Ctrl+Enter.