> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SpmShipment

> Denotes a shipment in the eMarketeer module. A SpmShipment object will be responsible for the actual shipment. This object needs a SpmStaticList and a SpmMessage object as input.

Denotes a shipment in the eMarketeer module. A SpmShipment object will be responsible for the actual shipment. This object needs a SpmStaticList and a SpmMessage object as input.

## Constructors

### SpmShipment()

```crmscript theme={null}
SpmShipment
```

Initializes a new instance of the SpmShipment class.

## Methods

## addList(Integer)

Adds a list of recipients to the shipment.

```crmscript theme={null}
Void addList(Integer list)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  You can add more than one list. If two or more of these lists contains the same address, only one email will be sent to this recipient. The lists can be of either dynamic or static types.
</Note>

## addListCRMProject(Integer)

Adds a CRM list of project members to shipment.

```crmscript theme={null}
Void addListCRMProject(Integer id)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## addListCRMSelection(Integer)

Adds a CRM selection to shipment.

```crmscript theme={null}
Void addListCRMSelection(Integer id)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## addListSelection(Integer)

Adds a selection list to shipment.

```crmscript theme={null}
Void addListSelection(Integer id)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## addListTicketSelection(Integer)

Adds a ticket selection list to shipment.

```crmscript theme={null}
Void addListTicketSelection(Integer id)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## save()

Saves the SpmShipment object.

```crmscript theme={null}
save()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of the SpmShipment object.

<Note>
  Warning: this will activate the shipment and it will be executed at the indicated start date.
</Note>

## setDescription(String)

Sets the descriptive text of the SpmShipment.

```crmscript theme={null}
Void setDescription(String description)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  It is not used in the outgoing email, but will be visible when listed in Service.
</Note>

## setFolderId(Integer)

Sets the folder that this SpmShipment will be stored in.

```crmscript theme={null}
Void setFolderId(Integer folderId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  If you specify a folder ID that does not exist, the shipment will not be visible through Service.
</Note>

## setFrom(String)

Sets the from address of the outgoing email.

```crmscript theme={null}
Void setFrom(String from)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  This should be an email address that is imported by Service unless you have other reasons to do so.
</Note>

## setMessage(Integer)

Sets the ID of the SpmMessage object that will be used for the shipment.

```crmscript theme={null}
Void setMessage(Integer messageId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  You must specify this for a shipment to be valid.
</Note>

## setSendRate(Integer)

Sets the rate of outgoing emails per minute for this shipment.

```crmscript theme={null}
Void setSendRate(Integer sendRate)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Required for a shipment! If you specify a value larger than Service actually can handle, it will send at full speed.

  Warning: this can lower performance of both eJournal and your mail server if set too high.
</Note>

## setStartDate(DateTime)

Sets the date and time when the shipment will be started.

```crmscript theme={null}
Void setStartDate(DateTime start)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  If you specify a past date the shipment will be started immediately.
</Note>


## Related topics

- [SpmMessage](/en/automation/crmscript/reference/CRMScript.Native.SpmMessage.md)
- [Namespace CRMScript.Native](/en/automation/crmscript/reference/CRMScript.Native.md)
- [CRMScript Reference](/en/automation/crmscript/reference/index.md)
- [SpmStaticList](/en/automation/crmscript/reference/CRMScript.Native.SpmStaticList.md)
- [Enum values for ShipmentLinkType](/en/database/tables/enums/shipmentlinktype.md)
- [s_list table](/en/database/tables/s-list.md)
