---
title: "setMockup Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.surface.setmockup.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.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 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- setMockup(mockup:  [IMockupTemplate](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.imockuptemplate.htm.md), previewMockups?:  [IMockupTemplate](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.imockuptemplate.htm.md) [], options?:  object ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc6/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("Failed to set up the mockup: ", error);
        });
    ```

#### Parameters

    - ##### mockup: [IMockupTemplate](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.imockuptemplate.htm.md) 
  
        A mockup to set.
    - #####  Optional previewMockups: [IMockupTemplate](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.imockuptemplate.htm.md) [] 
  
        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 &lt; Product &gt;
 
    A new product instance containing the changed surface.
