younifyd
Menu

Update Campaign

Update a campaign with the specified information.

PATCH/organizations/{organizationId}/campaigns/{campaignId}

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Update Campaign action (under Campaigns (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{updateCampaign.response.data}}.

Request

Path parameters

campaignIdstringrequired

The ID of the campaign.

organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

Request body

Enter the body as JSON in the step's Body field.

campaignIdstring

The ID of the campaign.

couponsarray<string>

The array of assigned coupon IDs, not sorted.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

customerGroupsarray<string>

The array of assigned customer groups, not sorted.

descriptionstring

The description of the campaign.

enabledboolean

The enabled flag for campaign.

endDatestring (date-time)

The date the scenario ends.

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

sourceCodeGroupsarray<string>

The array of assigned source code groups, not sorted.

startDatestring (date-time)

The date the scenario begins.

json
{
  "campaignId": "NewYearCampaign",
  "coupons": [
    "20%offOrder",
    "10%offWelcomeNewUser"
  ],
  "creationDate": "2019-10-03T19:36:56.000Z",
  "customerGroups": [
    "BigShoppers",
    "NorthAmericanShoppers"
  ],
  "description": "string",
  "enabled": true,
  "endDate": "2025-01-01T00:00:00Z",
  "lastModified": "2019-10-03T19:36:56.000Z",
  "sourceCodeGroups": [
    "affiliate-email",
    "gaming-email"
  ],
  "startDate": "2019-10-03T19:36:56.000Z"
}

Response

Returns 200 with an object. Read it in later steps with {{updateCampaign.response.data.<field>}}.

campaignIdstring

The ID of the campaign.

couponsarray<string>

The array of assigned coupon IDs, not sorted.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

customerGroupsarray<string>

The array of assigned customer groups, not sorted.

descriptionstring

The description of the campaign.

enabledboolean

The enabled flag for campaign.

endDatestring (date-time)

The date the scenario ends.

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

sourceCodeGroupsarray<string>

The array of assigned source code groups, not sorted.

startDatestring (date-time)

The date the scenario begins.

json
{
  "campaignId": "NewYearCampaign",
  "coupons": [
    "20%offOrder",
    "10%offWelcomeNewUser"
  ],
  "creationDate": "2019-10-03T19:36:56.000Z",
  "customerGroups": [
    "BigShoppers",
    "NorthAmericanShoppers"
  ],
  "description": "string",
  "enabled": true,
  "endDate": "2025-01-01T00:00:00Z",
  "lastModified": "2019-10-03T19:36:56.000Z",
  "sourceCodeGroups": [
    "affiliate-email",
    "gaming-email"
  ],
  "startDate": "2019-10-03T19:36:56.000Z"
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.