Home Planner iFrame Messages
iFrame messages support the communication between the planner and the embeding Website to provide openness and integration. This section describes iFrame messages that are listen by the planner (input) to react to parent window actions or emitted by the planner (output) to enable parent window to react.
IFrame Communication Introductionβ
To have an overview of the subject, we advise you to read window.postMessage documentation on the web.
β‘οΈ Refer to PostMessage documentation π
Every message received by the application or sent by the application through window.postMessage must be an object of this format:
| Key | Type | Description |
|---|---|---|
| event | string | The event name is used as unique identifier for a given event. |
| content | * | Content sent with the event. It is optional and can be anything: integer, array, object... |
Templateβ
{
event:"Login",
content:
{
token:"dez2fre589e"
}
}
Overview of Data Synchronizationβ
According to different integration context, the iframe messages that the Home Retailer Planner subscribe/publish can be divided into three parts.
Websiteβ
When Home Retailer Application is embeded in the client's Website, possible data synchronization could be as following:
| For... | Inputs Messages | Outputs Messages |
|---|---|---|
| Authentication | Authentication TokenRefreshed Login | AuthenticationRequired, AuthenticationSucceeded, AuthenticationFailed, TokenExpired, LoginRequired, LoginSucceeded, LoginFailed |
| Application | SetUpSettings | Ready, CloseApp, MinimizeButtonClicked |
| Load/Save Project | LoadProject | InfoRequestedProject,InfoRequestedUser,SaveStarted,ProjectSavingSucceeded, ProjectSavingFailed, ProjectLoadingSucceeded, ProjectLoadingFailed, ProductListWithBOM, ProjectInfoRequested, ProjectInfoGenerated |
| Share | ShareMedia, ShareProduct | |
| Buying Experience | AddToBasket | |
| Bill Of Material (BOM) | BOMComputationReady | |
| Price | ExternalPriceResponse | ExternalPriceRequested |
| Help Center | NeedHelpClicked | |
| Project Configurator Bridge | ProjConf_ExternalPriceResponse | ProjConf_ExternalPriceRequested, ProjConf_PriceInfoButtonClicked, ProjConf_NeedHelpClicked |
Third-party Applicationβ
When a third-party application (like a furniture configurator or a project configurator) is embeded in the Home Retailer Application as an iframe, possible data synchronization could be as following:
| For... | Inputs Messages | Outputs Messages |
|---|---|---|
| External Configurator | Listening, ProductSaved, BadRequest | ConfigureProduct, BadResponse |
| Project Configurator | ConfigureProject | Listening, BadRequest, Canceled, ProjectSaved |
Default Widgetβ
When a widget is embeded in the Home Retailer Application as an iframe, possible data synchronization could be as following:
| For... | Inputs Messages | Outputs Messages |
|---|---|---|
Listening, ClosePrintLayer | OpenPrintLayer, PrintButtonClicked | |
| Product Sheet | Listening, AddProduct, CloseProductSheet, ShareProductByOption, AddToFavorite, ProductClicked, ShowPreviousProduct, ConfigureProduct | OpenProductSheet |
| Project Overview | CloseProjectOverview, Listening, AddToBasket, FormattedPricesRequested, ShareMedia, DeleteMedia, OpenPrint | OpenProjectOverview, FormattedPrices |
Authenticationβ
AuthenticationRequiredβ
Output emitted when the application requests authentication parameters. Upon this request, the parent window must reply with an Authentication message.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | AuthenticationRequired | β |
| content | β | β | β |
Authenticationβ
Input received when authentication is requested by the message AuthenticationRequired, the parent window must reply with the following message.
| Key | Type | Value | Description |
|---|---|---|---|
| event | string | Authentication | β |
| content | object | tokendistributionID | token: The legal entity token generated by the client website.distributionID: The specific distribution in the legal entity. |
Templateβ
{
"token": string
"distributionID": string
}
AuthenticationSucceededβ
Output emitted by the application to acknowledge that authentication is successful.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | AuthenticationSucceeded | β |
| content | object | originappIDdistributionIDdistributionParams | origin: The domain from which the message originated. appID: The application ID associated with the provided credentials. distributionID: The distribution ID associated with the provided credentials.distributionParams: The distribution-specific parameters, if any, of the distribution associated with the provided credentials. |
Templateβ
{
"origin": string,
"appID": string,
"distributionID": string,
"distributionParams": object
}
AuthenticationFailedβ
Output emitted by the application to inform that authentication has failed.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | AuthenticationFailed | β |
| content | object | httpCodeidmessage | httpCode: The HTTP error code for the request.id: The error id message: The detailed error message. |
Templateβ
{
"httpCode": HttpErrorCode,
"id": string,
"message": string
}
TokenExpiredβ
Output emitted and sent to the parent window when a token is expired, subsequent calls to the web-services will fail with a 401 error.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | TokenExpired | β |
| content | object | null | β |
TokenRefreshedβ
Input received from the parent window. This message is send by the parent window when receiving TokenExpired. This message provides a new valid token to the application to authentify subsequent calls to web services.
| Key | Type | Value | Description |
|---|---|---|---|
| event | string | TokenRefreshed | β |
| content | object | tokendistributionID | token: The legal entity token generated by the client website.distributionID: The specific distribution in the legal entity. |
Templateβ
{
"token": string,
"distributionID": string
}
LoginRequiredβ
Output emitted when an action requires a logged user and none is currently logged in the application, this message will be sent.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | LoginRequired | β |
| content | β | β | β |
Loginβ
Input received from the parent window when the user has successfully logged in and the user token is generated.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Login | β |
| content | object | token: string | token: Token generated by client website. |
LoginSucceededβ
Output emitted when the application succeeded to log in the user (from a token for example), it will send this message.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | LoginSucceeded | β |
| content | β | β | β |
LoginFailedβ
Output emitted when the application failed to log in the user (from a token for example), it will send this message.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | LoginFailed | β |
| content | β | β | β |
Applicationβ
Readyβ
Output emitted by the planner. The application needs some time to be ready to listen to messages. Listen to this message and ensure that it has been emitted before sending any other iFrame message.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Ready | β |
| content | β | β | β |
SetUpSettingsβ
Input request to set up a few information for the planner.
This message has to contain information for the planner project name to display. It must be a JSON object as described below.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | SetUpSettings | β |
| content | object | projectName | projectName (optional): String to provide project name and disable the save project popin. |
Templateβ
{
"projectName": "TestUser"
}
CloseAppβ
Output emitted when the user clicks on the cross button to close the application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | CloseApp | β |
| content | β | β | β |
MinimizeButtonClickedβ
Output emitted when the user clicks on the minimize button to minimize the application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | MinimizeButtonClicked | β |
| content | β | β | β |
Load/Save Projectβ
LoadProjectβ
For performance reasons, it is recommended if applicable, to start the planner by providing the project UUID as an URL parameter. This message should be used only for other scenarios.
Input request for project load in kitchen application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | LoadProject | β |
| content | object | id: string | Project UUID from the ByMe platform. |
InfoRequestedProjectβ
Output emitted with additional information about the current project.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | InfoRequestedProject | β |
| content | object | projectIDprojectNameprojectDescProjectDateCreationProjectDateUpdate | projectID: UUID of the project.projectName: Name of the project.projectDesc: Description of the project.ProjectDateCreation: Creation date of the project.ProjectDateUpdate: Update date of the project. |
InfoRequestedUserβ
Output emitted with additional information about the current user.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | InfoRequestedUser | β |
| content | object | userID | userID: ID of the user. |
SaveStartedβ
Output emitted when the save process of a project is started in the planner, with additional information about the saved project.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | SaveStarted | β |
| content | object | bom configuredBoms projectInfo configuredProjectInfos projectID | bom: Product List, refer to Bill of Material Reference for a complete description of BOM in JSON format. configuredBoms: An array of objects each containing the BOM of a project configurator group. Each object contains the following keys: - configurationName- configuratorId- groupId- bom projectInfo: The project infos of the Home project. configuredProjectInfos: An array of objects each containing the project infos of a project configurator group. Each object contains the following keys: - configurationName- configuratorId- groupId- projectInfo projectID: Project UUID from the ByMe platform. |
Templateβ
{
"event": "SaveStarted",
"content": {
"bom": { ... },
"configuredBoms": [
{
"configurationName": "My configuration name",
"configuratorId": "confId",
"groupId": "xxx-yyy-zzz",
"bom": { ... }
}
],
"projectInfo": { ... },
"configuredProjectInfos": [
{
"configurationName": "My configuration name",
"configuratorId": "confId",
"groupId": "xxx-yyy-zzz",
"projectInfo": { ... }
}
],
"projectID": "xxx-yyy-zzz"
}
}
ProjectSavingSucceededβ
Output emitted when the project is saved in the planner, with additional information about the saved project.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectSavingSucceeded | β |
| content | object | idnamedescription | id: Project UUID from the ByMe platform.name: The name of the saved project.description: The description of the saved project. |
ProjectSavingFailedβ
Output emitted when the project is try to save and failed in the planner, with additional information about the project.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectSavingFailed | β |
| content | β | β | β |
ProjectLoadingSucceededβ
Output emitted when the project is loading with success in the planner.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectLoadingSucceeded | β |
| content | β | β | β |
ProjectLoadingFailedβ
Output emitted when the project is loading in the planner and failed.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectLoadingFailed | β |
| content | β | β | β |
ProductListWithBOMβ
Input and Output send this event to get the BOM, and the same event is emitted whith the result.
As input:
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProductListWithBOM | β |
| content | β | β | β |
As output:
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProductListWithBOM | β |
| content | object | bomconfiguredBoms | bom: the BOM of the Home projectconfiguredBoms: an array of objects each containing the BOM of a project configurator group. Each object contains the following keys: - configurationName- configuratorId- groupId- bom |
Templateβ
{
"event": "ProductListWithBOM",
"content": {
"bom": { ... },
"configuredBoms": [
{
"configurationName": "My configuration name",
"configuratorId": "confId",
"groupId": "xxx-yyy-zzz",
"bom": { ... }
}
]
}
}
ProjectInfoRequestedβ
Input send this event to the planner to retreive the project infos.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectInfoRequested | β |
| content | object | expanded | expanded: Boolean. If true, returns an expanded version of the project infos with details on every sub-products |
ProjectInfoGeneratedβ
Output emitted by the planner when the Project Infos is requested. By listening to this event, the planner sends the necessary data related to ProjectInfos coming from project configurators.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectInfoGenerated | β |
| content | object | projectInfoconfiguredProjectInfos | projectInfo: the project infos of the Home projectconfiguredProjectInfos: an array of objects each containing the project infos of a project configurator group. Each object contains the following keys: - configuratorId- groupId- projectInfo |
Templateβ
{
"event": "ProjectInfoGenerated",
"content": {
"projectInfo": { ... },
"configuredProjectInfos": [
{
"configuratorId": "confId",
"groupId": "xxx-yyy-zzz",
"projectInfo": { ... }
}
]
}
}
Bill Of Material (BOM)β
BOMComputationReadyβ
Output emitted at the first time when the BOM is able to be computed by the planner (e.g. after opening a project).
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | BOMComputationReady | β |
| content | object | BOM | Product List, refer to Bill of Material Reference for a complete description of BOM in JSON format. |
ExternalPriceRequestedβ
It is possible to use an external price engine to compute the total price, and this feature is controlled by the parameter useExternalPriceEngine in application distribution.
Output emitted by the planner after each BOM computation when using an external price engine.
By listening to this event, the integration developer can implement the business logic of the total price computation based on the BOM. The computed price info has to be sent back to the planner with the message ExternalPriceResponse.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ExternalPriceRequested | β |
| content | object | bom | bom: Contains Item List, refer to Bill of Material Reference for a complete description of BOM in JSON format. |
ExternalPriceResponseβ
Input received by the planner after the total price is computed by the client integration (see ExternalPriceRequested).
This message has to contain all the necessary informations for the planner to display the price. It must be a JSON object as described below.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ExternalPriceResponse | β |
| content | object | pricabletotalPrice | pricable: boolean that tells if the BOM sent via ExternalPriceRequested can be priced. Setting false will result in the planner displaying an error message instead of the price.totalPrice: a JSON object containing the following keys:- regular: regular price (number)- current: current price (number)- discountType: type of discount (string)- startDate: date from which the kitchen price becomes available (string). Must be a valid date string input for the Date.parse() js function.- endDate: date after which the kitchen price is no longer available (string). Must be a valid date string input for the Date.parse() js function.For more information about the totalPrice attribute, see the BOM documentation |
Templateβ
{
"event": "ExternalPriceResponse",
"content": {
"pricable": true,
"totalPrice": {
"regular": 6500,
"current": 6250,
"discountType": "membership",
"startDate": null,
"endDate": "2021-12-05T00:00:00.000Z"
}
}
}
Help Centerβ
NeedHelpClickedβ
Output emitted when user clicks on "Need more help?" link in help center in Home application. It can be used by the integration developers to display any kind of help to the consumer.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | NeedHelpClicked | Additional assistance from help center in Home. |
| content | β | β | β |
Project Configurator Bridgeβ
Messages in this list are specific to project configurators. If you don't use a project configurator, the following messages are not used.
If you use a project configurator, the following messages are bridged from your website to the project configurator (passing by HR) and back. Here is an example to illustrate:

β οΈ Only the following messages are bridged, so any other message sent by the project configurator will not be bridged to the website. Similarily, any other message sent by the website will not be bridged to the project configurator.
Note that your project configurator must support those iframe messages without the
ProjConf_prefix. See the project configurator associated documentation for more information.
ProjConf_ExternalPriceRequestedβ
Output emitted by the planner when a project configurator requests an external price computation.
By listening to this event, the integration developer can implement the business logic of the total price computation based on the BOM. The computed price info has to be sent back to the planner with the message ProjConf_ExternalPriceResponse.
The content of this message depends on the project configurator. Check the associated documentation.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjConf_ExternalPriceRequested | β |
| content | any | any | the content depends on the project configurator |
ProjConf_ExternalPriceResponseβ
Input received by the planner after the total price is computed by the client integration for a project configurator (see ProjConf_ExternalPriceRequested).
The content of this message depends on the project configurator. Check the associated documentation.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjConf_ExternalPriceResponse | β |
| content | any | any | the content depends on the project configurator |
ProjConf_PriceInfoButtonClickedβ
Output emitted by the planner when a price info button is clicked in a project configurator.
The content of this message depends on the project configurator. Check the associated documentation.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjConf_PriceInfoButtonClicked | β |
| content | any | any | the content depends on the project configurator |
ProjConf_NeedHelpClickedβ
Output emitted by the planner when the need help link is clicked in the help center in a project configurator.
The content of this message depends on the project configurator. Check the associated documentation.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjConf_PriceInfoButtonClicked | β |
| content | any | any | the content depends on the project configurator |
External Configuratorβ
Listeningβ
Input emitted for the initialization of each module of the application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Listening | β |
| content | β | β | β |
ProductSavedβ
Input emitted when the product is saved in the external configurator.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProductSaved | β |
| content | object | configuratorData : String configuratorID : String description : String extension : String modelBuffer : ArrayBuffer name : String price : Float thumbnail : ArrayBuffer thumbnailExtension : String | configuratorData: The product new configurationData. This value is stored by the platform, to give back to the configurator for any future modification of the product. configuratorID : ID of the configurator description: (Optional) description of the product extension : the 3D model fileβs extension (only BM3 and GLTF currently supported) modelBuffer: the 3D model file as an ArrayBuffer name: name of the product price : (Optional) the productβs price thumbnail : The thumbnail of the final configured product as an ArrayBuffer thumbnailExtension : the thumbnail fileβs extension (only JPG currently supported) |
Templateβ
{
configuratorData: "B61-315 Module L50 x H231||C||S|Material__zone1|Chene_Structure||S|Material__zone2|Tex-Style",
configuratorID: "gautier_innersense",
description: "Module L50 H231 P37 - L50 / B61-315 Module L50 x H231 / ChΓͺne structurΓ© / 0",
extension: "BM3",
modelBuffer: ArrayBuffer(492018) {}",
name: "B61-315 Module L50 x H231",
price: 0,
thumbnail: ArrayBuffer(6110) {},
thumbnailExtension: "JPG"
}
BadRequestβ
Input emitted when the request is not valid or the user encounters another error like a network issue.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | BadRequest | β |
| content | object | error : String | error: error message explaining the issue. |
Templateβ
{
error: "The detailed message of the encountered error."
}
ConfigureProductβ
Input emmited when the user want to configure the product with external configurator (add/remove/edit assembly component etc.).
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ConfigureProduct | β |
| content | object | configurationData : String | configurationData: The configuration data of the product |
Templateβ
{
configurationData: "Table Module L50 x H231"
}
BadResponseβ
Output emmited when the user encounters an error when the product is saved.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | BadResponse | β |
| content | object | error : String | error: error message explaining the issue.. |
Templateβ
{
error: "error message explaining the issue."
}
Project Configuratorβ
Listeningβ
Output emitted by the project configurator at startup to indicate Home Retailers that it is ready.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Listening | β |
| content | β | β | β |
ConfigureProjectβ
Input emitted by Home Retailers to initialize the project configurator with data
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ConfigureProject | β |
| content | object | project: json objecttoken: stringconfigurationData: object | project: the Home Retailers full projecttoken: the Home Retailers token. Should be used to authenticate to the ByMe API.configurationData: object containing the following data:- buildingIndex (number): the index of the current building displayed in HR when launching the configurator- levelIndex (number): the index of the current level displayed in HR when launching the configurator- nonConfigurableUuids (array of strings): the list of products UUIDs that do not belong to this configurator. These are products inserted from HR directly, or from another project configurator. You should not allow their modification in your configurator.- furnitureUuid (string): the UUID of a furniture from your configurator that the user wishes to edit specifically. This is not given the first time a user enters your configurator. |
Templateβ
{
"project": { *bmproj_content* },
"token": "xxxyyyzzz",
"configurationData": {
"buildingIndex": 0,
"levelIndex": 1,
"nonConfigurableUuids": [ "aaabbbccc", "dddeeefff" ],
"furnitureUuid": null
}
}
BadRequestβ
Output emitted by the project configurator when it encounters an error like a network issue.
This event will close the configurator and resume Home Retailers with no modification to the project. An error notification is displayed to inform the user.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | BadRequest | β |
| content | object | error: string | error: error message explaining the issue. |
Templateβ
{
"error": "The detailed message of the encountered error."
}
Canceledβ
Output emitted by the project configurator when the user cancels the configuration.
This event will close the configurator and resume Home Retailers with no modification to the project.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Canceled | β |
| content | β | β | β |
ProjectSavedβ
Output emmited by the project configurator when the user validates the configuration.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectSaved | β |
| content | object | project: json objectconfigurationData: object | project: the updated project (will be loaded by Home Retailers)configurationData: object containing the following data:- configuredUuids (array of strings): the full list of products UUIDs that are managed by this configurator- bom (object): the full BOM of this configurator. Must only include products whose UUIDs are in configuredUuids (do not price non-configured products)- projectInfos (object): the project infos of this configurator. |
Templateβ
{
"project": { *bmproj_content* },
"configurationData": {
"configuredUuids": [ "aaabbbccc", "dddeeefff" ],
"bom": { *bom_content* },
"projectInfos": { *project_infos_content* },
},
}
Printβ
PrintButtonClickedβ
Output emitted if the user clicks "Print" button.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | PrintButtonClicked | β |
| content | object | name description updateDate brandingJson rawMedias translation language namespace roomsBOM outsideBOM projectBOM showBrand | name: Name of the project description: Project description updateDate: uodated datebrandingJson: styling Json of the brand (retailer) rawMedias: list of project media translation: Mapping of translations, with which to override the default one in widget language: Language of the application namespace: Configure i18n translations. roomsBOM: Get BOM products for each level of the project. outsideBOM: An object with a "furnitures" entry, an array of all the furnitures outside the building projectBOM: Get BOM materials contained in the project. showBrand: Show brand |
OpenPrintLayerβ
Output emitted for opening print layer with requested parameters. Those are described below:
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | OpenPrintLayer | β |
| content | object | translationlanguagenamespace roomsBOM projectBOM | translation: Print name translation language: Language of the application namespace: Configure i18n translations roomsBOM: Get BOM products for each level of the project. projectBOM: Get BOM materials contained in the project. |
Templateβ
{
"translation": object,
"language": string,
"namespace": string,
"roomsBOM": object,
"projectBOM": object,
}
Listeningβ
Input emitted for the initialization of each module of the application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Listening | β |
| content | object | β | β |
ClosePrintLayerβ
Input emmited when the user wants to close the print layer.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ClosePrintLayer | β |
| content | β | β | β |
Product Sheetβ
SpecialProductInfoRequestedβ
Output emitted if the user clicks "i" button.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | SpecialProductInfoRequested | β |
| content | object | dbID reference name typeID type shortDescription brandID brandName width height depth | dbID: "Product's DB ID" reference: "" name: "Name of the product" typeID: "Type ID of furniture" type: "Type of furniture" shortDescription: "" brandID: "Product Brand's ID" brandName: "Product Brand" width: "Width of the Product" height: "Height of the Product" depth: "Depth of the Product" |
OpenProductSheetβ
Output requested when the ProductSheet widget has finished being loaded (thus with the reception of message "Listening" from widget), the application will send "OpenProductSheet" event to ProductSheet widget to ask for visulization of product informations.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | OpenProductSheet | β |
| content | object | isConfigurableisProductSetsubProducts sharingOptions hasBackButton translation language namespace | isConfigurable: If the product can be configured by an external configurator isProductSet: If the product is a product set subProducts: Object contains the similar product of the current product sharingOptions: List of shared options. hasBackButton: If several visited products. translation: 2 translations keys, one for the website, one for the widget language: Language of the application. namespace: Configure i18n translations. |
Templateβ
{
"event": "OpenProductSheet",
"content": {
"dbID": "GENERIC_FURNITURE_0158",
"reference": "lit_double_06",
"name": "Double Bed",
"typeID": 108,
"type": "furniture",
"freeTags": [],
"commercialDescription": "King size with blue linen",
"shortDescription": "Double bed",
"thumbnailURLLarge": "https://d15x0cs0o0urpo.cloudfront.net/286A8CED-9ADD-4345-A7FF-FF9462024168/Thumbnails/512.jpg",
"thumbnailURLMedium": "https://d15x0cs0o0urpo.cloudfront.net/286A8CED-9ADD-4345-A7FF-FF9462024168/Thumbnails/256.jpg",
"thumbnailURLSmall": "https://d15x0cs0o0urpo.cloudfront.net/286A8CED-9ADD-4345-A7FF-FF9462024168/Thumbnails/64.jpg",
"startDate": null,
"endDate": null,
"isExpired": false,
"brandID": 5,
"brandName": "BryoForHR",
"clientMetadata": null,
"width": 1704,
"height": 853,
"depth": 2147,
"price": {
"regular": {
"value": 700,
"type": "regular",
"startDate": null,
"endDate": null,
"additionalData": null
},
"current": {
"value": 640,
"type": "reduced",
"startDate": null,
"endDate": null,
"additionalData": null
},
"discountType": "reduced"
},
"prices": {
"regularPrice": "Β£700.00",
"discountType": "reduced",
"currentPrice": "Β£640.00"
},
"regularPriceLabel": "Regular price",
"reduced": true,
"subProducts": [
{
"dbID": "GENERIC_FURNITURE_0155",
"reference": "lit_double_03",
"name": "",
"typeID": 108,
"type": "furniture",
"freeTags": [],
"commercialDescription": "",
"shortDescription": "",
"thumbnailURLLarge": "https://d15x0cs0o0urpo.cloudfront.net/3CF77789-92E4-450F-8555-8082961591F4/Thumbnails/512.jpg",
"thumbnailURLMedium": "https://d15x0cs0o0urpo.cloudfront.net/3CF77789-92E4-450F-8555-8082961591F4/Thumbnails/256.jpg",
"thumbnailURLSmall": "https://d15x0cs0o0urpo.cloudfront.net/3CF77789-92E4-450F-8555-8082961591F4/Thumbnails/64.jpg",
"startDate": null,
"endDate": null,
"isExpired": false,
"brandID": 5,
"brandName": "BryoForHR",
"clientMetadata": null,
"width": 1937,
"height": 667,
"depth": 2182
},
{
"dbID": "GENERIC_FURNITURE_0179",
"reference": "lit_double_04",
"name": "",
"typeID": 108,
"type": "furniture",
"freeTags": [],
"commercialDescription": "",
"shortDescription": "",
"thumbnailURLLarge": "https://d15x0cs0o0urpo.cloudfront.net/F923B35A-4323-4C05-ADB7-CDF262C3DA1E/Thumbnails/512.jpg",
"thumbnailURLMedium": "https://d15x0cs0o0urpo.cloudfront.net/F923B35A-4323-4C05-ADB7-CDF262C3DA1E/Thumbnails/256.jpg",
"thumbnailURLSmall": "https://d15x0cs0o0urpo.cloudfront.net/F923B35A-4323-4C05-ADB7-CDF262C3DA1E/Thumbnails/64.jpg",
"startDate": null,
"endDate": null,
"isExpired": false,
"brandID": 5,
"brandName": "BryoForHR",
"clientMetadata": null,
"width": 1800,
"height": 2197,
"depth": 2327
},
{
"dbID": "GENERIC_FURNITURE_0445",
"reference": "generique_lit_standart_01",
"name": "Double bed",
"typeID": 108,
"type": "furniture",
"freeTags": [],
"commercialDescription": "",
"shortDescription": "",
"thumbnailURLLarge": "https://d15x0cs0o0urpo.cloudfront.net/37E1B42A-81BB-4513-9899-AE7610D2D481/Thumbnails/512.jpg",
"thumbnailURLMedium": "https://d15x0cs0o0urpo.cloudfront.net/37E1B42A-81BB-4513-9899-AE7610D2D481/Thumbnails/256.jpg",
"thumbnailURLSmall": "https://d15x0cs0o0urpo.cloudfront.net/37E1B42A-81BB-4513-9899-AE7610D2D481/Thumbnails/64.jpg",
"startDate": null,
"endDate": null,
"isExpired": false,
"brandID": 5,
"brandName": "BryoForHR",
"clientMetadata": null,
"width": 1607.438,
"height": 610.3379999515712,
"depth": 2005.66
}
],
"sharingOptions": [
{
"name": "facebook",
"enabled": true
},
{
"name": "twitter",
"enabled": true
},
{
"name": "pinterest",
"enabled": true
},
{
"name": "mail",
"enabled": true
},
{
"name": "embed",
"enabled": true
}
],
"hasBackButton": false,
"productSheetURL": ""
}
}
Listeningβ
Input emitted for the initialization of each module of the application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Listening | β |
| content | object | β | β |
AddProductβ
Input emmited when user clicks on "Add to project" button on te ProductSheet widget, send "AddProduct" message to application to inform request of product insertion.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | AddProduct | β |
| content | β | β | β |
CloseProductSheetβ
Input emmited when the user clicks on "close" icon on the ProductSheet widget, send "CloseProductSheet" message to inform the application that the ProductSheet widget has been destroyed.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | CloseProductSheet | β |
| content | β | β | β |
ShowPreviousProductβ
Input emmited when user clicks on βbackβ button on the product sheet view, he asks to see the previous product to be displayed in the product sheet.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ShowPreviousProduct | β |
| content | object | dbId | dbId: the dbId of the product |
{
"dbId": "GENERIC_FURNITURE_0270"
}
ShareProductByOptionβ
Input emmited when the user wants to share the product through a specific social network.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ShareProductByOption | β |
| content | object | option name productSheetURL | option: the name of the option clickedname: name of the product productSheetURL: The URL of the product sheet |
{
"option": pinterest,
"name": "Service Porcelaine 18 pces PERLE CHIC",
"productSheetURL": " http://www.customer.html"
}
ShareProductβ
Output emmited when the user wants to share the product through a specific social network.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ShareProduct | β |
| content | object | option name | option: the name of the option clickedname: name of the product |
{
"option": pinterest,
"name": "Service Porcelaine 18 pces PERLE CHIC",
"productSheetURL": " http://www.customer.html"
}
AddToFavoriteβ
Input emmited when the user wants to add the product into favorite.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | AddToFavorite | β |
| content | object | dbId from | dbId: the dbId of the product from: Indicates where does the request comes from. |
{
"dbId": "GENERIC_FURNITURE_0270",
"from": "product-sheet",
}
ProductClickedβ
Input emmited when the user clicks on one of the product in the similar product section, this message is sent to the planner to display the selected product.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProductClicked | β |
| content | object | dbId | dbId: the dbId of the product |
{
"dbId": "GENERIC_FURNITURE_0270"
}
Project Overviewβ
OpenProjectOverviewβ
Output emitted for opening project overview of the user with several parameters. Those are described below:
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | OpenProjectOverview | β |
| content | object | translation language namespace roomsBOM projectBOM | translation: 2 translations keys, one for the website, one for the widget language: Language of the application. namespace: Configure i18n translations. roomsBOM: Get BOM products for each level of the project. projectBOM: Get BOM materials contained in the project. |
Templateβ
{
"translation": object,
"language": string,
"namespace": string,
"roomsBOM": object,
"projectBOM": object,
}
ProjectOverviewButtonClickedβ
Output emitted for iFrame message of project overview with several parameters. Those are described below:
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ProjectOverviewButtonClicked | β |
| content | object | name description tab projectUserID hidePrice sharingOptions price materialPricing brandingJson properties surface totalMediasCount rawMedias translation language namespace roomsBOM outsideBOM projectBOM owner currentUser showBrand | name: Name of the project description: Project description tab: tabprojectUserID: Project User ID hidePrice: Boolean sharingOptions: Sharing Options price: a JSON object containing price details materialPricing: Boolean brandingJson: styling Json of the brand (retailer) properties: Project properties surface: Details of surface area totalMediasCount: Total media count rawMedias: list of project media translation: Mapping of translations, with which to override the default one in widget language: Language of the application namespace: Configure i18n translations. roomsBOM: Get BOM products for each level of the project. outsideBOM: An object with a "furnitures" entry, an array of all the furnitures outside the building projectBOM: Get BOM materials contained in the project. owner: Owner currentUser: Current logged in User showBrand: Show brand |
{
"event": "ProjectOverviewButtonClicked",
"content": {
"hidePrice": false,
"materialPricing": true,
"proceed": true,
"sharingOptions": [],
"tab": 1,
"name": "My project",
"description": null,
"projectUserID": 54,
"price":{},
"language": "en-GB",
"namespace": "translation",
"currentUser": 54,
"owner": true,
"showBrand": true,
"brandingJson":{},
"properties":{},
"surface":{},
"totalMediasCount": 1,
"rawMedias":[],
"outsideBOM":{},
"roomsBOM":[],
"projectBOM":[]
}
}
AddToBasketβ
Input requested when the user clicks on "Add to basket" button on the ProjectOverview default widget. He should be able to select some or all of the products presented in the item list, when the selection has been done, send "AddToBasket" event to inform the application of the user selection.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | AddToBasket | β |
| content | object | products | products: Array of products that user want to buy, each element in the array must be an object containing the dedicated properties. |
Listeningβ
Input emitted for the initialization of each module of the application.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | Listening | β |
| content | object | β | β |
ShareMediaβ
Input emmited when the user want to share one of his generated media, he click on "share" media button, Widget will send iframe message "ShareMedia" with related media information to ask for share.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | ShareMedia | β |
| content | object | shareTarget media | shareTarget: The social media's target media: The URL of the media |
{
"event": "ShareMedia",
"content": {
"shareTarget": "twitter",
"media": "https://byme-enterprise-preprod.s3.eu-west-1.amazonaws.com/data/homebymeProjects/9FD743DB-D854-46A5-B968-D3B33F3854E1/images/renderHQ/CE1737A6-8929-4A2A-B9C7-455DE5B7BCDA_468_351.jpg"
}
}
DeleteMediaβ
Input emmited when the user wants to remove one of his generated media, he click on "delete" media button. The widget will send iframe message "DeleteMedia" with related media information to ask for deletion. The App will then send the "WsMediaDeleted" iframe message once media is deleted.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | DeleteMedia | β |
| content | object | imageID | imageID: The ID of the image which is necessary to delete |
{
"event": "DeleteMedia",
"content": {
"imageID": 49540
}
}
CloseProjectOverviewβ
Input emmited when the user click on "close" icon on the ProjectOverview default widget, send "CloseProjectOverview" event to inform the application that the default widget has been destroyed.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | CloseProjectOverview | β |
| content | β | β | β |
OpenPrintβ
Input emitted for opening print widget.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | OpenPrint | β |
| content | β | β | β |
FormattedPricesRequestedβ
Input emmited when the user is selecting the products to be added to his basket. We need to update the total price based on the selected products. The calculated total price does not have the local format, so we need to send the prices information to the application to have the correcting formatting.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | FormattedPricesRequested | β |
| content | object | prices from | prices: Array of product prices which are not yet formatted in the current local from: Indicates where does the request comes from. |
{
"event": "FormattedPricesRequested",
"content": {
"prices": {
"regular": 0,
"current": 0,
"discountType": null,
"vatInformation": null
},
"from": "ItemList"
}
}
FormattedPricesβ
Output emmited when user is selecting the products to be added to his basket. We need to update the total price based on the selected products. At this time, the calculated total price does not have the local format, so we need to send the prices information to the application to have the correct formatting.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | FormattedPrices | β |
| content | object | prices from | prices: Array of product prices formatted in the current locale from: Indicates where does the request comes from. |
Templateβ
{
"prices": {
"regular": 0,
"current": 0,
"discountType": null,
"vatInformation": null
},
"from": "ItemList",
}
WsMediaDeletedβ
Output emmited when user has deleted a media from his generated medias and WS call is done.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | string | DeleteMedia | β |
| content | object | imageID remainingSum | imageID: The ID of the image which is necessary to delete remainingSum: number of remaining medias |
{
"event": "WsMediaDeleted",
"content": {
"imageID": 49540,
"remainingSum": 37
}
}
SendUpdatedMediasβ
Output emmited when user has deleted a media from his generated medias and default widget has requested the updated medias object.
| Key | Type | Value/Template | Description |
|---|---|---|---|
| event | String | "SendUpdatedMedias" | |
| content | Object | []: Array | - []: Array of all available medias |
{
"event": "SendUpdatedMedias",
"content": [
{
"creationDate": "2020-08-03T09:59:53.000Z",
"id": 74502,
"metadata": {media: "images/render360/3DCE4252-EA9B-4DF3-8F25-C6F74C299β¦/3DCE4252-EA9B-4DF3-8F25-C6F74C29934C_468_351.jpg", gallery: "images/render360/3DCE4252-EA9B-4DF3-8F25-C6F74C299β¦/3DCE4252-EA9B-4DF3-8F25-C6F74C29934C_960_540.jpg", quality: "High", krpanoTour: "images/render360/3DCE4252-EA9B-4DF3-8F25-C6F74C29934C/vtour/tour.xml", compensated: false, β¦},
"name": null,
"typeMediaID": 1,
"url": "https://byme-enterprise-preprod.s3.eu-west-1.amazonaws.com/data/homebymeProjects/22FEF3D1-F6C1-4656-8578-B68A29D426C6/images/render360/3DCE4252-EA9B-4DF3-8F25-C6F74C29934C"
},
{
"creationDate": "2020-03-05T11:16:29.000Z",
"id": 50414,
"metadata": {media: "images/5-3-2020_12-16-28_468_351.jpg", gallery: "images/5-3-2020_12-16-28_960_540.jpg"},
"name": "Snapshot",
"type": 2,
"typeMediaID": 3,
"url": "https://byme-enterprise-preprod.s3.eu-west-1.amazonaws.com/data/homebymeProjects/22FEF3D1-F6C1-4656-8578-B68A29D426C6/images/5-3-2020_12-16-28_960_540.jpg"
}
...
]
}
Templateβ
{
"prices": {
"regular": 0,
"current": 0,
"discountType": null,
"vatInformation": null
},
"from": "ItemList",
}