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 |
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 | |
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 | token distributionID | 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 | origin appID distributionID distributionParams | 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 | httpCode id message | 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 | token distributionID | 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 | – | – | – |
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 | projectID projectName projectDesc ProjectDateCreation ProjectDateUpdate | 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 | id name description | 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 | bom configuredBoms | 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 | projectInfo configuredProjectInfos | 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 | pricable totalPrice | 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* },
},
}
OpenPrintLayer
Output emitted for opening print layer with requested parameters. Those are described below:
Key | Type | Value/Template | Description |
---|---|---|---|
event | string | OpenPrintLayer | – |
content | object | translation language namespace 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
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 | isConfigurable isProductSet subProducts 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,
}
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",
}