younifyd
Menu

Update Variation Attribute Value

Update a variation attribute value.

PATCH/organizations/{organizationId}/products/{productId}/variation-attributes/{attributeId}/values/{id}

Use it in a workflow

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

Request

Path parameters

productIdstringrequired

The id (SKU) of the product.

attributeIdstringrequired

The variation attribute ID.

idstringrequired

The ID of the variation attribute to create.

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.

descriptionobject

The localized description of the variation value.

imageobject

Document representing media file.

absUrlstring

The absolute URL with request protocol.

altobject

The alternative image text.

disBaseUrlstring

The Dynamic Image Service (DIS) base URL for product images only.

pathstringrequired

The raw media file path.

titleobject

The image title.

imageSwatchobject

Document representing media file.

absUrlstring

The absolute URL with request protocol.

altobject

The alternative image text.

disBaseUrlstring

The Dynamic Image Service (DIS) base URL for product images only.

pathstringrequired

The raw media file path.

titleobject

The image title.

nameobject

The localized display name of the variation value.

orderableboolean

A flag indicating whether at least one variant with this variation attribute value is available to sell.

positionnumber (double)

The position of the value among all values of a variation attribute.

valuestringrequired

The actual variation value.

json
{
  "value": "red",
  "description": {
    "en_US": "Red"
  },
  "image": {
    "path": "/images/apple-ipod-classic.jpg",
    "absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
    "alt": {
      "en_US": "iPod"
    },
    "disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
    "title": {
      "en_US": "iPod"
    }
  },
  "imageSwatch": {
    "path": "/images/apple-ipod-classic.jpg",
    "absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
    "alt": {
      "en_US": "iPod"
    },
    "disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
    "title": {
      "en_US": "iPod"
    }
  },
  "name": {
    "color": "Red"
  },
  "orderable": true,
  "position": 2
}

Response

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

descriptionobject

The localized description of the variation value.

imageobject

Document representing media file.

absUrlstring

The absolute URL with request protocol.

altobject

The alternative image text.

disBaseUrlstring

The Dynamic Image Service (DIS) base URL for product images only.

pathstringrequired

The raw media file path.

titleobject

The image title.

imageSwatchobject

Document representing media file.

absUrlstring

The absolute URL with request protocol.

altobject

The alternative image text.

disBaseUrlstring

The Dynamic Image Service (DIS) base URL for product images only.

pathstringrequired

The raw media file path.

titleobject

The image title.

nameobject

The localized display name of the variation value.

orderableboolean

A flag indicating whether at least one variant with this variation attribute value is available to sell.

positionnumber (double)

The position of the value among all values of a variation attribute.

valuestring

The actual variation value.

json
{
  "value": "red",
  "description": {
    "en_US": "Red"
  },
  "image": {
    "path": "/images/apple-ipod-classic.jpg",
    "absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
    "alt": {
      "en_US": "iPod"
    },
    "disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
    "title": {
      "en_US": "iPod"
    }
  },
  "imageSwatch": {
    "path": "/images/apple-ipod-classic.jpg",
    "absUrl": "https://www.example-image.com/images/apple-ipod-classic.jpg",
    "alt": {
      "en_US": "iPod"
    },
    "disBaseUrl": "https://www.dis-base-url/images/apple-ipod-clasic.jpg",
    "title": {
      "en_US": "iPod"
    }
  },
  "name": {
    "color": "Red"
  },
  "orderable": true,
  "position": 2
}

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