---
title: "SetSlugCommand | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/SetSlugCommand/"
---

# SetSlugCommand

> - [`BaseSurfaceCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#abstract-basesurfacecommand)\<[`ISetSlugCommandArgs`](#isetslugcommandargs), `void`\>

## Classes

### SetSlugCommand

#### Extends

#### Constructors

##### Constructor

```ts
new SetSlugCommand(
   productHandler, 
   historyArgs, 
   args): SetSlugCommand;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productHandler` | [`ProductHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ProductHandler.md#producthandler) |
| `historyArgs` | [`IHistoryArgs`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ModelUpdateCommand.md#ihistoryargs) |
| `args` | [`ISetSlugCommandArgs`](#isetslugcommandargs) |

###### Returns

[`SetSlugCommand`](#setslugcommand)

###### Overrides

[`BaseSurfaceCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#abstract-basesurfacecommand).[`constructor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#constructor)

#### Methods

##### execute()

```ts
execute(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Inherited from

[`BaseSurfaceCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#abstract-basesurfacecommand).[`execute`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#execute)

##### executeCommandBody()

```ts
executeCommandBody(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

```ts
BaseSurfaceCommand._executeCommandBody
```

##### redo()

```ts
redo(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

[`BaseSurfaceCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#abstract-basesurfacecommand).[`redo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#redo)

##### undo()

```ts
undo(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

[`BaseSurfaceCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#abstract-basesurfacecommand).[`undo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseSurfaceCommand.md#undo)

## Interfaces

### ISetSlugCommandArgs

#### Properties

##### slug

```ts
slug: Margin;
```

##### surface?

```ts
optional surface?: Surface;
```
