Custom URL Parameter

useCustomer

The useCustomer parameter ensures that a user is redirected to the correct context when they have access to multiple customer accounts. It allows you to define exactly which customer context should be active when a link is clicked.

Why use it?

In B2B environments, a single user often manages or buys for multiple companies. If a user is currently logged in under "Company A" but clicks an email link intended for "Company B", they might encounter an error or see the wrong data.

By appending useCustomer, the platform automatically switches the user to the correct customer context before loading the page, provided the user has the necessary permissions for that customer.

Implementation Details

  • Availability: This parameter is currently supported exclusively for the /b2b_platform controller (all Vue.js-based B2B Platform URLs).

  • Accepted Values: You can pass either the Customer Number or the Customer ID (UUID).

Practical Example: Offer Management

This function is primarily used within the Offer Management workflow. When a sales representative sends an offer to a customer:

  1. The "Order Offer" button in the email includes the useCustomer parameter.

  2. Upon clicking, the user is instantly switched to the correct customer account.

  3. The offer checkout pop-up opens immediately with the correct context, preventing manual switching.

circle-info

Always include the useCustomer parameter when generating URLs for emails or third-party integrations to ensure a seamless user experience.

circle-exclamation

Last updated

Was this helpful?