---
title: "setMockup Method"
canonical: https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.surface.setmockup.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["4.4.25", "4.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# setMockup Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 4.4.25, 4.x (may differ) · **Archived documentation**
 
### Callable
 
- setMockup(mockup:  [MockupTemplateTypes](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.htm.md), options?:  object ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.product.htm.md) &gt;

- Sets a new surface mockup and returns a new product instance containing the changed surface.
  
 - example
     - ```
    mockup = { 
        up: "envelopeMockup"
    }
    
    editor.getProduct()
        .then(function (product) {
            product.surfaces[0].setMockup(mockup)
                .then(function (product) {
                    console.log("Mockup is successfully set for product " + product.id);
                });
        })
        .catch(function (error) {
            console.error("Setting up a mockup failed with exception: ", error);
        });
    ```

#### Parameters

    - ##### mockup: [MockupTemplateTypes](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.htm.md) 
  
        A mockup to set.
    - #####  Optional options: object 
  
        Mockup additional configuration.

        - #####  Optional updateRevertData:  boolean 
  
            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 &lt; Product &gt;
 
    A new product instance containing the changed surface.
