younifyd
Menu

Assign Variation Group To Master Product

Assign or create a variation group for a product.

PUT/organizations/{organizationId}/products/{masterProductId}/variation-groups/{id}

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Assign Variation Group To Master Product action (under Products (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{assignVariationGroupToMasterProduct.response.data}}.

Request

Path parameters

idstringrequired

The ID of the variation attribute to create.

masterProductIdstringrequired

The ID of the master product that contains the variation group.

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Request body

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

orderableboolean

A flag indicating whether the variation group is orderable.

pricenumber (double)

The sales price of the variation group.

productIdstringrequired

The ID (SKU) of the variation group.

variationValuesobject

The actual variation attribute ID - value pairs.

json
{
  "productId": "apple-ipod-classic-black",
  "orderable": true,
  "price": 229.99,
  "variationValues": {
    "color": "red"
  }
}

Response

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

orderableboolean

A flag indicating whether the variation group is orderable.

pricenumber (double)

The sales price of the variation group.

productIdstring

The ID (SKU) of the variation group.

variationValuesobject

The actual variation attribute ID - value pairs.

json
{
  "productId": "apple-ipod-classic-black",
  "orderable": true,
  "price": 229.99,
  "variationValues": {
    "color": "red"
  }
}

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

Assign Variation Group To Master Product — Salesforce Commerce Cloud — Documentation