This is an old documentation. Go to the latest Customer's Canvas docs

setMockup Method


  • Sets a new surface mockup and returns a new product instance containing the changed surface.

    mockup = { 
        up: "envelopeMockup"
        .then(function (product) {
                .then(function (product) {
                    console.log("Mockup is successfully set for product " +;
        .catch(function (error) {
            console.error("Failed to set up the mockup: ", error);


    • mockup: IMockupTemplate

      A mockup to set.

    • Optional previewMockups: IMockupTemplate []

      A collection of preview mockups for proof images.

    • Optional options: object

      Additional configuration of mockups.

      • Optional updateRevertData: boolean

        Defines whether this mockup should be reverted or not when the user reverts product changes. If true, the new mockup is stored as one to restore when the product is reverted. Otherwise, the previously stored mockup is restored on a product revert. The default value is true.

    Returns Promise < Product >

    A new product instance containing the changed surface.