HomeByMe Launcher
Principle diagram

Utility
The HomeByMe Launcher is a web application enabling a website to easily integrate an HBM configurator in conjunction with a Retail operations solution.
It can:
- create a new project on first save
- open read-only or modify existing HBM projects in Retail operations
- automatically update the Retail operations document when the HBM project is saved in the Launcher.
How it works
In order to launch the Home.by.me application, the calling web site must use the HomeByMe Launcher, which will itself dialogue with the home.by.me application, acting as an intermediary between the two systems.
To do this, the calling site must embed the HomeByMe Launcher in an iFrame and initialize it by passing it several arguments detailed later in this document. From there, the use of postMessage methods will enable the two entities to dialogue.
When the user finalizes his project on the [Home.by.me] application (http://Home.by.me), feedback is provided.
In addition, it is also possible for the calling site to use the WEB Services provided to retrieve information on the Retail operations projects that concern it, see: API doc.
To use the launcher, you first need an external Retail operations API account, which will enable you to call the {LAUNCHER_TOKEN} creation api point.
A {LAUNCHER_TOKEN} only gives access to a single Retail operations document, which means that once a Launcher has been opened, it can only access a single document. If you want to open another document/project, you need to generate a new {LAUNCHER_TOKEN} and reopen the iframe with this new token.
Calling the Retail operations Back Office portal
In order to launch the Retail operations portal, it is necessary to pass various parameters in the call URL.
These parameters allow you to pass security as well as transmit various information to the home.by.me application.
{URL}?launcherToken={LAUNCHER_TOKEN}&application={APPLICATION}&distribution={DISTRIBUTION}
Below are the details of the values corresponding to these parameters:
{URL} : website address (provided by Dassault Systèmes)
Mandatory parameters
{LAUNCHER_TOKEN} : Authentication token to be generated from the api GET /api/externals/v1/launcher/token.
Optional parameters
{APPLICATION} : Code of the application that must be launched at startup. If nothing is specified, the HBMKITCHEN application is used by default:
- HBMKITCHEN: Retail operations portal for the Home.by.me integration
- HBMRETAILER: Retail operations portal for the integration of the Home.by.me Retail version
{DISTRIBUTION} : In the case where several different distributions/brands can be called for the same integration, it is necessary to specify the desired distribution when opening the glider. This value is a character string corresponding to a distributionID of HomeByMe.
LauncherToken generation
The launcher token must be generated from the api GET /api/externals/v1/launcher/token using the API account.
For a new project : the launcher token api must be called with the parameter
{
type: 'create'
}
For an existing project : the launcher token api must be called with the parameter
{
type: 'edit'
, projectID: int // projectID from Retail operations
, documentTypeID: int // documentTypeID from Retail operations
, documentID: int // documentID from Retail operations
}
Supported commands
Passage of information
The configurator being included in a web page, it is possible to communicate through different messages. For this we use the cross-domain message sending API included in HTML5.
For more documentation see: https://developer.mozilla.org/fr/docs/Web/API/Window/postMessage
The expected postMessage messages are json strings which must contain an “event” section indicating the Name of the message transmitted, as well as a “content” section whose content will depend on the type of event.
AuthenticationLauncherToken
Message to send to the Retail operations iFrame to refresh the launcher token when requested by the “AuthenticationRequired” PostMessage.
JSON exchange example:
{
"event" : "AuthenticationLauncherToken",
"content" : {
"token": string // new launcher token
}
}
The new launcher token is generated using the same method as the launcher token present in the url.
InitializeCustomerInfo
Message to send to the Retail operations iFrame in order to pass it information relating to the Consumer/Final Customer as well as their possible Project, if already defined or to the Store concerned.
JSON exchange example:
{
"event" : "InitializeCustomerInfo",
"content" : {
"customer" : {
"emailAddress" : string, // Customer Email address
"firstName" : string, // Customer First name
"lastName" : string, // Customer Last name
"mobilePhone" : string, // Mobile phone number
"homePhone" : string, // Home phone number
"mainAddress" : {
"street1" : string, // N° and street name
"street2" : string, // Additional address
"street3" : string, // Additional address
"zipCode" : string, // Zip code
"city" : string, // City
"countryCode" : string // ISO3 code of the Country
},
"internalCode"