DeliveryProfile
Core library DeliveryProfile — create, update, and remove delivery profiles (no Retrieve in this namespace).
DeliveryProfile manages delivery profiles (routing / delivery settings used with send classifications). The Core library exposes Init, Add, Update, and Remove — there is no DeliveryProfile.Retrieve in this namespace; query profiles with WSProxy or another API if you need read access outside an instance.
Requires Platform.Load("core", "1.1.5") before use.
Methods
| Method | Returns | Description |
|---|---|---|
DeliveryProfile.Init(key) |
DeliveryProfileInstance | Bind by external key |
DeliveryProfile.Add(properties) |
string | Create a delivery profile |
<DeliveryProfileInstance>.Update(properties) |
string | Update the initialized profile |
<DeliveryProfileInstance>.Remove() |
string | Delete the profile |
DeliveryProfile.Init
Initializes a DeliveryProfile instance for the given external key.
Syntax
DeliveryProfile.Init(key)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | External key of the delivery profile |
Return value
DeliveryProfileInstance
Examples
Platform.Load("core", "1");
var myProfile = DeliveryProfile.Init("myDeliveryProfile");
DeliveryProfile.Add
Creates a new delivery profile with the specified properties.
Syntax
DeliveryProfile.Add(properties)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
properties |
object | Yes | New profile (Name, CustomerKey, Description, SourceAddressType, …) |
Return value
"OK" on success.
Examples
Platform.Load("core", "1.1.5");
var newDP = {
Name: "SSJS Added Delivery Profile",
CustomerKey: "test_delivery_profile",
Description: "An SSJS Added Profile",
SourceAddressType: "DefaultPrivateIPAddress"
};
var status = DeliveryProfile.Add(newDP);
<DeliveryProfileInstance>.Update
Updates the initialized delivery profile with the given properties.
Syntax
<DeliveryProfileInstance>.Update(properties)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
properties |
object | Yes | Attributes to change |
Return value
"OK" on success.
Examples
Platform.Load("core", "1.1.5");
var myProfile = DeliveryProfile.Init("myDeliveryProfile");
var status = myProfile.Update({ Name: "SSJS Updated Delivery Profile" });
<DeliveryProfileInstance>.Remove
Removes the initialized delivery profile.
Syntax
<DeliveryProfileInstance>.Remove()
Return value
"OK" on success.
Examples
Platform.Load("core", "1.1.5");
var myProfile = DeliveryProfile.Init("myDeliveryProfile");
var status = myProfile.Remove();