younifyd
Menu

Get Product Options

Retrieve product options for a product.

GET/organizations/{organizationId}/products/{productId}/product-options

Use it in a workflow

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

Request

Path parameters

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).

Query parameters

currencystring

A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.

limitinteger (int32)

Number of records to retrieve per request. Must be between 1 (minimum) and 50 (maximum). Defaults to 25.

Default 25

offsetinteger (int32)

Used to retrieve the results based on a particular resource offset.

Default 0

Response

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

dataarray<object>

The array of product option objects.

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.

imageobject5 fields

Document representing media file.

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>5 fields

The sorted array of values of the product option.

json
{
  "data": [
    {
      "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": null,
              "value": null
            }
          ],
          "skuExtension": "extension"
        }
      ]
    }
  ]
}

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