younifyd
Menu

Update Product Option

Update a product option.

PATCH/organizations/{organizationId}/products/{productId}/product-options/{id}

Use it in a workflow

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

Request

Path parameters

idstringrequired

The ID of the variation attribute to create.

productIdstringrequired

The id (SKU) of the product.

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.

customNameobject

The localized custom name of the product option.

defaultProductOptionValuestring

The default product option value.

descriptionobject

The localized description of the product option.

idstringrequired

The object attribute definition ID which is also the identifier for the product option.

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.

namestring

The name of the object attribute definition.

selectedOptionValuestring

The selected option value of the product option.

sharedboolean

The flag that indicates if the product option is shared or local.

sortingModestring

The sorting mode for the product option values.

One ofbyexplicitorderbyoptionprice

valuesarray<object>

The sorted array of values of the product option.

defaultProductOptionValueboolean

Flag indicating if the product option value is the default value for the product option.

idstringrequired

The ID of the product option value.

optionPricesarray<object>2 fields

The list of prices in the product option value.

skuExtensionstring

The SKU extension of the product option value.

valueobjectrequired

The localized value of the product option.

json
{
  "id": "warranty",
  "customName": {
    "en_US": "Warranty"
  },
  "defaultProductOptionValue": "5-years",
  "description": {
    "en_US": "Option Description"
  },
  "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"
    }
  },
  "name": "Warranty",
  "selectedOptionValue": "2-years",
  "shared": false,
  "sortingMode": "byoptionprice",
  "values": [
    {
      "id": "5-year",
      "value": {
        "en_US": "5 Year Warranty"
      },
      "defaultProductOptionValue": true,
      "optionPrices": [
        {
          "currencyMnemonic": "USD",
          "value": 1234.56
        }
      ],
      "skuExtension": "extension"
    }
  ]
}

Response

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

customNameobject

The localized custom name of the product option.

defaultProductOptionValuestring

The default product option value.

descriptionobject

The localized description of the product option.

idstring

The object attribute definition ID which is also the identifier for the product option.

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.

namestring

The name of the object attribute definition.

selectedOptionValuestring

The selected option value of the product option.

sharedboolean

The flag that indicates if the product option is shared or local.

sortingModestring

The sorting mode for the product option values.

One ofbyexplicitorderbyoptionprice

valuesarray<object>

The sorted array of values of the product option.

defaultProductOptionValueboolean

Flag indicating if the product option value is the default value for the product option.

idstringrequired

The ID of the product option value.

optionPricesarray<object>2 fields

The list of prices in the product option value.

skuExtensionstring

The SKU extension of the product option value.

valueobjectrequired

The localized value of the product option.

json
{
  "id": "warranty",
  "customName": {
    "en_US": "Warranty"
  },
  "defaultProductOptionValue": "5-years",
  "description": {
    "en_US": "Option Description"
  },
  "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"
    }
  },
  "name": "Warranty",
  "selectedOptionValue": "2-years",
  "shared": false,
  "sortingMode": "byoptionprice",
  "values": [
    {
      "id": "5-year",
      "value": {
        "en_US": "5 Year Warranty"
      },
      "defaultProductOptionValue": true,
      "optionPrices": [
        {
          "currencyMnemonic": "USD",
          "value": 1234.56
        }
      ],
      "skuExtension": "extension"
    }
  ]
}

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