TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

saveProduct Method


  • Saves a product current state. For details, see the Introducing the IFrame API topic.

    // Saving a product to the "" file.
        // 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);


    • Optional stateId: string

      Specifies a state file name without an extension, up to 36 symbols length. If such a file exists, it will be overwritten. You can pass this parameter for any user except master and default. If you omit this parameter, then a new file name is generated.

    Returns Promise < ISaveProductResult >

    Returns a promise with a return-to-edit URL, userId, and stateId.