Heading to the Printing United trade show? Schedule a meeting with our representatives.

IUserChanges Interface

A structure containing all changes the user made to the product when personalizing it. For details, see the Introducing the IFrame API topic.

example
// Completing product customization.
editor.finishProductDesign()
    // If product customization is completed successfully.
    .then(function (result) {
        // Get the promise properties.
        stateId = result.stateId;
        userId = result.userId;
        userChanges = result.userChanges;
        console.log("Text user changes: ", userChanges.texts);
    })
    // If there was an error thrown when completing product customization.
    .catch(function (error) {
        console.error("Completing product customization failed with exception: ", error);
    });

Properties

inStringPlaceholders

inStringPlaceholders: IUserChangeItem []

An array of texts entered by the user in text placeholders. For each text placeholder, which was changed by the user, the corresponding object contains its name and new value.

mockups

mockups: object

An object containing array of mockups that the user set up. For each mockup, which was applied to a surface, the corresponding object contains the surface and mockup names.

mockups declaration

  • [surfaceName: string ]: string

    The name of a mockup defined for a surface.

surfaces

surfaces: ISurfacesChanges

An object containing user changes on a per-surface basis. Each surface, where the user changes text elements, has texts and inStringPlaceholders arrays with the element name and new value.

texts

texts: IUserChangeItem []

An array of texts entered by the user in text elements. For each text element, which was changed by the user, the corresponding object contains its name and new value.