4.5 - Help Center
During the configuration of a product, some errors may happen that could prevent the user from getting a valid product: a parameter using an expired value, for instance.
To alert on these instances, the configurator send an event reporting all the detected cases. If the applicative rule ExpiredProductsRule 🔗 has been created, this event is fired after the first loading of the main product, and after any parameter change if the report's content has changed.
| Event name | Input / Output | Payload | Reason |
|---|---|---|---|
helpCenterChanged | Output event | HelpCenter Report | Receive every report for problems in the configuration. |
helpCenterChanged​
| Attribute name | Type | Content |
|---|---|---|
reports | An array of HelpCenter Reports | All reports for problems detected in the configuration. If a problem exists multiple times, it's only reported once. |
Reports​
A report is dedicated to one problem at a time. It has the following attributes:
| Attribute name | Type | Content |
|---|---|---|
id | string | A unique and stable string identifier |
type | string | The type of error. Only expiredProduct for now, when a product is not available anymore. |
description | string | A description of the issue. |
product ? | Product | Optional main product targeted by the report, absent if the report concerns a global parameter. |
resolution ? | Resolution | Optional resolution to solve the reported error, if possible. |
Types of report​
The expiredProduct report can happen when a configuration has been saved before, when it was valid, but reloaded later and one of its part is now not available anymore.
Report Product​
If the reported problem concerns one product in particular in the composition, the event specifies it. It has the following attributes:
| Attribute name | Type | Content |
|---|---|---|
dbId | string | dbId of the concerned product. |
photo ? | string | Optional url of the photo of the product. |
name | string | Translated name of the product. |
reference | string | Reference of the product. |
Report Resolution​
If the reported problem can be resolved, the event adds a resolution. It has the following attributes:
| Attribute name | Type | Content |
|---|---|---|
type | string | Type of resolution. Only menuOpening for now. |
resolutionPayload | Resolution Payload | More details about the resolution, format depends on the type. |
Cases where no resolution is possible:
- A non-modular product is expired: this reference can no longer be used.
Types of resolution​
If a resolution has the type menuOpening, it means the user can replace an expired product by another one available in the configuration menu.
Resolution Payload​
If the resolution's type is menuOpening​
The resolution payload indicates which parameter to change on which product, and its scope. Its attributes are:
| Attribute name | Type | Content |
|---|---|---|
productUuid ? | string | Optional uuid of the targeted product, if the expired product is not global. |
scope | string | Scope of the parameter, local or global. |
parameterId | string | Identifier of the parameter on which the expired product is. |