ISaveProductResult

A structure used by Editor.saveProduct to store return value. See the Handling Product Customization topic for details.

example
// Saving a product.
editor.saveProduct()
    // If the product is saved correctly.
    .then(function (result) {
        // Get the promise properties.
        userId = result.userId;
        stateId = result.stateId;
        returnToEditUrl = result.returnToEditUrl;
        console.log("User " + userId + " successfully saved state " + stateId);
    })
    // If there was an error thrown while saving the product.
    .catch(function (error) {
        console.error("Saving product failed with exception: ", error);
    });

Properties

returnToEditUrl

returnToEditUrl: string

A return-to-edit URL. This property is provided for backward compatibility only; it utilizes the old API based on query string. To learn on how to perform the same functionality using IFrame API see Loading Product State Into Editor.

stateId

stateId: string

A product state identifier

userId

userId: string

The identifier of the user who currently works with the editor.