Skip to main content

Output data

When the user finishes editing the configuration, this workflow element triggers the submit event. To process the result, handle this event as follows:

configurator.addEventListener("submit", event => console.log(event));

As a result, the following object will be returned:

{
designId?: string; // Depending on the mode, the identifier of either the public design template or private design for the linked product variant
mockup3dId?: string; // The identifier of the public mockup linked to the product variant
clickedButton?: ConfiguratorSubmitButton; // The button type through which the submit event was called, either "Personalize" or "Upload"
lineItemCost?: { // The data about the price

price?: number; // The calculated price
discount?: number; // The calculated discount
quantity?: number; // The quantity
totalPrice?: number; // The total price obtained by multiplying the calculated price by the quantity
totalDiscount?: number; // The total discount obtained by multiplying the calculated discount by the quantity
totalCost?: number; // The final cost including the discount
appliedPriceRules?: AppliedPriceRuleDto[] | null; // Applied price rules
appliedDiscountRules?: AppliedDiscountRule[] | null; // Applied discount rules

}
}
Was this page helpful?