Bathroom Planner URL Parameters
The application can be configured with the help of URL parameters. These parameters can be in the form of query parameters, added to the application's frame URL.
This section describes about the different supported URL parameters.
Foreword
Additional to the application distribution settings, the bathroom planner can be configured with some URL parameters that will take the form of query parameters to be added in the planner frame URL (See how to embed the Bathroom planner 🔗 to know what that is).
Example: https://bathroomUrl.by.me/Bathroom/?param1=value1&booleanParam¶m3=value3
Note:
These parameters are added in the embedded planner URL.
i.e The iframe src attribute.
Supported Parameters
ln
This parameter will override the default locale set-up in the application distribution parameters.
It must be one of the locales defined in the locales application distribution parameter.
Example: {plannerURL}?ln=en-US
currency
This parameter defines the currency to use in the application. If set, it must be one of the currency codes defined in the currencies application distribution parameter.
If not set, the planner fallsback on the locale-currency configuration (see GET /applications/{id}/currencylocales/{locale} 🔗).
Example: {plannerURL}?currency=EUR
projectId
This parameter is used to load a project, instead of loading the default project.
Example: {plannerURL}?projectId=xxxx-yyyy-zzzz
HQRDbID
This parameter is used to open the planner with the point of view of an HQ rendering when its project is loaded. It is only used with the projectId
, provided in the planner URL(ignored otherwise).
Example: {plannerURL}?projectId=xxxx-yyyy-zzzz&HQRDbID=12345
mode
This parameter is used to launch the planner in a particular mode. Here is the list of supported modes.
Mode | Description |
---|---|
DefaultProjectCreation | Use this mode to create and configure default projects |
For more information, refer create default project.
Example: {plannerURL}?mode=DefaultProjectCreation
beta / kitchenBeta (Pre-Released features)
This parameter is used to launch the planner in beta mode in order to test the pre-released features. The planner will then include additional features that are ready for test before their integration in the bathroom standard product.
This is a boolean parameter, no value required.
Example: {plannerURL}?kitchenBeta
or {plannerURL}?beta
disableRecovery
This parameter controls if the recovery feature is active or not, for "not logged-in" users.
When a user is not logged-in and launches the planner, if the local storage contains a backup project (meaning the planner was closed without saving last time), the planner will display a pop-in that proposes to recover the project in cache.
However, if the disableRecovery
parameter is given, this pop-in will not be displayed.
For more information, refer recover project.
It is a boolean parameter, no value required.
Example: {plannerURL}?disableRecovery
Note:
This parameter only controls the recovery feature for "not logged-in" users.
If a user launches the planner and is already logged in, the recovery pop-in will always be displayed, if applicable, even if thedisableRecovery
parameter is provided in the URL.
marketZone
This parameter is used to determine which price to display and calculate when a product has several prices that depends on a market zone. The market zone is also an application distribution parameter (see here 🔗) which can be used to determine which catalog of products to show on a given market zone. If both parameters are set, the url parameter has the priority (convenient for testing purpose).
Here is an example of the prices attribute set on a product in a json format:
"prices":
[
{
"typePrice": "regular",
"price": 10,
"startDate": null,
"endDate": null,
"currency": "EUR",
"additionalInformations": "[]",
"reference": null,
"marketZone": "west-eu1"
},
{
"typePrice": "regular",
"price": 20,
"startDate": null,
"endDate": null,
"currency": "EUR",
"additionalInformations": "[]",
"reference": null,
"marketZone": "west-eu2"
},
{
"typePrice": "membership",
"price": 5,
"startDate": "2019-10-24T00:00:00.000Z",
"endDate": "2021-01-31T00:00:00.000Z",
"currency": "EUR",
"additionalInformations": "null",
"reference": null,
"marketZone": null
},
{
"typePrice": "discounted",
"price": 5,
"startDate": "2019-10-24T00:00:00.000Z",
"endDate": "2021-01-31T00:00:00.000Z",
"currency": "EUR",
"additionalInformations": "null",
"reference": null,
"marketZone": null
},
{
"typePrice": "ecoFee",
"price": 2,
"startDate": null,
"endDate": null,
"currency": "EUR",
"additionalInformations": "null",
"reference": null,
"marketZone": "west-eu1"
},
{
"typePrice": "ecoFee",
"price": 4,
"startDate": null,
"endDate": null,
"currency": "EUR",
"additionalInformations": "null",
"reference": null,
"marketZone": "west-eu3"
}
]
If the market zone is set to west-eu1
in the url, the prices that do not have the same market zone as the one in the url will be ruled out and won't appear in the app. Then the displayed prices for this example product will be:
regular: 10
membership: none
ecofee: 2
Same logic if the market zone is set to west-eu2
:
regular: 20
membership: 5
ecofee: none
If no market zone is set in the url, then prices that do not match this market zone will be ruled out and the first price that appears in the json without any market zone for a given type will be displayed:
regular: none
membership: 5
ecofee: none
Example: {plannerURL}?marketZone=west-eu1
Afterword
Choosing between several Application Distributions is not performed in the URL, but by iFrame message. The selection is performed by setting the proper distributionID in the Authentication message.