Skip to main content
Version: Released

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:

KeyTypeDescription
eventstringThe 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 MessagesOutputs Messages
AuthenticationAuthentication TokenRefreshed LoginAuthenticationRequired, AuthenticationSucceeded, AuthenticationFailed, TokenExpired, LoginRequired, LoginSucceeded, LoginFailed
ApplicationSetUpSettingsReady, CloseApp, MinimizeButtonClicked
Load/Save ProjectLoadProjectInfoRequestedProject,InfoRequestedUser,SaveStarted,ProjectSavingSucceeded, ProjectSavingFailed, ProjectLoadingSucceeded, ProjectLoadingFailed, ProductListWithBOM, ProjectInfoRequested, ProjectInfoGenerated
ShareShareMedia, ShareProduct
Buying ExperienceAddToBasket
Bill Of Material (BOM)BOMComputationReady
PriceExternalPriceResponseExternalPriceRequested
Help CenterNeedHelpClicked
Project Configurator BridgeProjConf_ExternalPriceResponseProjConf_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 MessagesOutputs Messages
External ConfiguratorListening, ProductSaved, BadRequestConfigureProduct, BadResponse
Project ConfiguratorConfigureProjectListening, 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 MessagesOutputs Messages
PrintListening, ClosePrintLayerOpenPrintLayer, PrintButtonClicked
Product SheetListening, AddProduct, CloseProductSheet, ShareProductByOption, AddToFavorite, ProductClicked, ShowPreviousProduct, ConfigureProductOpenProductSheet
Project OverviewCloseProjectOverview, Listening, AddToBasket, FormattedPricesRequested, ShareMedia, DeleteMedia, OpenPrintOpenProjectOverview, FormattedPrices

Authentication​

AuthenticationRequired​

Output emitted when the application requests authentication parameters. Upon this request, the parent window must reply with an Authentication message.

KeyTypeValue/TemplateDescription
eventstringAuthenticationRequired–
content–––

Authentication​

Input received when authentication is requested by the message AuthenticationRequired, the parent window must reply with the following message.

KeyTypeValueDescription
eventstringAuthentication–
contentobjecttoken
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.

KeyTypeValue/TemplateDescription
eventstringAuthenticationSucceeded–
contentobjectorigin
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.

KeyTypeValue/TemplateDescription
eventstringAuthenticationFailed–
contentobjecthttpCode
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.

KeyTypeValue/TemplateDescription
eventstringTokenExpired–
contentobjectnull–

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.

KeyTypeValueDescription
eventstringTokenRefreshed–
contentobjecttoken
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.

KeyTypeValue/TemplateDescription
eventstringLoginRequired–
content–––

Login​

Input received from the parent window when the user has successfully logged in and the user token is generated.

KeyTypeValue/TemplateDescription
eventstringLogin–
contentobjecttoken: stringtoken: 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.

KeyTypeValue/TemplateDescription
eventstringLoginSucceeded–
content–––

LoginFailed​

Output emitted when the application failed to log in the user (from a token for example), it will send this message.

KeyTypeValue/TemplateDescription
eventstringLoginFailed–
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.

KeyTypeValue/TemplateDescription
eventstringReady–
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.

KeyTypeValue/TemplateDescription
eventstringSetUpSettings–
contentobjectprojectName
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.

KeyTypeValue/TemplateDescription
eventstringCloseApp–
content–––

MinimizeButtonClicked​

Output emitted when the user clicks on the minimize button to minimize the application.

KeyTypeValue/TemplateDescription
eventstringMinimizeButtonClicked–
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.

KeyTypeValue/TemplateDescription
eventstringLoadProject–
contentobjectid: stringProject UUID from the ByMe platform.

InfoRequestedProject​

Output emitted with additional information about the current project.

KeyTypeValue/TemplateDescription
eventstringInfoRequestedProject–
contentobjectprojectID
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.

KeyTypeValue/TemplateDescription
eventstringInfoRequestedUser–
contentobjectuserIDuserID: 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.

KeyTypeValue/TemplateDescription
eventstringSaveStarted–
contentobjectbom
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.

KeyTypeValue/TemplateDescription
eventstringProjectSavingSucceeded–
contentobjectid
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.

KeyTypeValue/TemplateDescription
eventstringProjectSavingFailed–
content–––

ProjectLoadingSucceeded​

Output emitted when the project is loading with success in the planner.

KeyTypeValue/TemplateDescription
eventstringProjectLoadingSucceeded–
content–––

ProjectLoadingFailed​

Output emitted when the project is loading in the planner and failed.

KeyTypeValue/TemplateDescription
eventstringProjectLoadingFailed–
content–––

ProductListWithBOM​

Input and Output send this event to get the BOM, and the same event is emitted whith the result.

As input:

KeyTypeValue/TemplateDescription
eventstringProductListWithBOM–
content–––

As output:

KeyTypeValue/TemplateDescription
eventstringProductListWithBOM–
contentobjectbom
configuredBoms
bom: the BOM of the Home project
configuredBoms: 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.

KeyTypeValue/TemplateDescription
eventstringProjectInfoRequested–
contentobjectexpanded
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.

KeyTypeValue/TemplateDescription
eventstringProjectInfoGenerated–
contentobjectprojectInfo
configuredProjectInfos
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:
- 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).

KeyTypeValue/TemplateDescription
eventstringBOMComputationReady–
contentobjectBOMProduct 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.

KeyTypeValue/TemplateDescription
eventstringExternalPriceRequested–
contentobjectbom
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.

KeyTypeValue/TemplateDescription
eventstringExternalPriceResponse–
contentobjectpricable
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.

KeyTypeValue/TemplateDescription
eventstringNeedHelpClickedAdditional 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:

Project Configurator iframe example

⚠️ 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.

KeyTypeValue/TemplateDescription
eventstringProjConf_ExternalPriceRequested–
contentanyanythe 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.

KeyTypeValue/TemplateDescription
eventstringProjConf_ExternalPriceResponse–
contentanyanythe 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.

KeyTypeValue/TemplateDescription
eventstringProjConf_PriceInfoButtonClicked–
contentanyanythe 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.

KeyTypeValue/TemplateDescription
eventstringProjConf_PriceInfoButtonClicked–
contentanyanythe content depends on the project configurator

External Configurator​

Listening​

Input emitted for the initialization of each module of the application.

KeyTypeValue/TemplateDescription
eventstringListening–
content–––

ProductSaved​

Input emitted when the product is saved in the external configurator.

KeyTypeValue/TemplateDescription
eventstringProductSaved–
contentobjectconfiguratorData : 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.

KeyTypeValue/TemplateDescription
eventstringBadRequest–
contentobjecterror : Stringerror: 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.).

KeyTypeValue/TemplateDescription
eventstringConfigureProduct–
contentobjectconfigurationData : StringconfigurationData: 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.

KeyTypeValue/TemplateDescription
eventstringBadResponse–
contentobjecterror : Stringerror: 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.

KeyTypeValue/TemplateDescription
eventstringListening–
content–––

ConfigureProject​

Input emitted by Home Retailers to initialize the project configurator with data

KeyTypeValue/TemplateDescription
eventstringConfigureProject–
contentobjectproject: json object
token: string
configurationData: object
project: the Home Retailers full project
token: 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.

KeyTypeValue/TemplateDescription
eventstringBadRequest–
contentobjecterror: stringerror: 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.

KeyTypeValue/TemplateDescription
eventstringCanceled–
content–––

ProjectSaved​

Output emmited by the project configurator when the user validates the configuration.

KeyTypeValue/TemplateDescription
eventstringProjectSaved–
contentobjectproject: json object
configurationData: 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.

KeyTypeValue/TemplateDescription
eventstringPrintButtonClicked–
contentobjectname
description
updateDate
brandingJson
rawMedias
translation
language
namespace
roomsBOM
outsideBOM
projectBOM
showBrand
name: Name of the project
description: Project description
updateDate: uodated date
brandingJson: 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:

KeyTypeValue/TemplateDescription
eventstringOpenPrintLayer–
contentobjecttranslation
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.

KeyTypeValue/TemplateDescription
eventstringListening–
contentobject––

ClosePrintLayer​

Input emmited when the user wants to close the print layer.

KeyTypeValue/TemplateDescription
eventstringClosePrintLayer–
content–––

Product Sheet​

SpecialProductInfoRequested​

Output emitted if the user clicks "i" button.

KeyTypeValue/TemplateDescription
eventstringSpecialProductInfoRequested–
contentobjectdbID
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.

KeyTypeValue/TemplateDescription
eventstringOpenProductSheet–
contentobjectisConfigurable
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.

KeyTypeValue/TemplateDescription
eventstringListening–
contentobject––

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.

KeyTypeValue/TemplateDescription
eventstringAddProduct–
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.

KeyTypeValue/TemplateDescription
eventstringCloseProductSheet–
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.

KeyTypeValue/TemplateDescription
eventstringShowPreviousProduct–
contentobjectdbIddbId: 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.

KeyTypeValue/TemplateDescription
eventstringShareProductByOption–
contentobjectoption
name
productSheetURL
option: the name of the option clicked
name: 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.

KeyTypeValue/TemplateDescription
eventstringShareProduct–
contentobjectoption
name
option: the name of the option clicked
name: 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.

KeyTypeValue/TemplateDescription
eventstringAddToFavorite–
contentobjectdbId
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.

KeyTypeValue/TemplateDescription
eventstringProductClicked–
contentobjectdbIddbId: 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:

KeyTypeValue/TemplateDescription
eventstringOpenProjectOverview–
contentobjecttranslation
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:

KeyTypeValue/TemplateDescription
eventstringProjectOverviewButtonClicked–
contentobjectname
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: tab
projectUserID: 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.

KeyTypeValue/TemplateDescription
eventstringAddToBasket–
contentobjectproductsproducts: 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.

KeyTypeValue/TemplateDescription
eventstringListening–
contentobject––

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.

KeyTypeValue/TemplateDescription
eventstringShareMedia–
contentobjectshareTarget
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.

KeyTypeValue/TemplateDescription
eventstringDeleteMedia–
contentobjectimageIDimageID: 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.

KeyTypeValue/TemplateDescription
eventstringCloseProjectOverview–
content–––

OpenPrint​

Input emitted for opening print widget.

KeyTypeValue/TemplateDescription
eventstringOpenPrint–
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.

KeyTypeValue/TemplateDescription
eventstringFormattedPricesRequested–
contentobjectprices
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.

KeyTypeValue/TemplateDescription
eventstringFormattedPrices–
contentobjectprices
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.

KeyTypeValue/TemplateDescription
eventstringDeleteMedia–
contentobjectimageID
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.

KeyTypeValue/TemplateDescription
eventString"SendUpdatedMedias"
contentObject[]: 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",
}