younifyd
Menu

Get Component

Get a component by ID.

GET/organizations/{organizationId}/components/{componentId}

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Component action (under Shopper Experience).
  3. Fill in the fields below, then reference the result from later steps as {{getComponent.response.data}}.

Request

Path parameters

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

componentIdstringrequired

Identifier for the requested component.

Query parameters

parametersstring

A free-form definition of parameters that influences the page rendering according to its implementation. This parameter must not contain more than 256 characters after URL decoding.

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.

localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

Response

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

idstring

Component identifier.

typeIdstring

Component type identifier.

namestring

Display name of the component.

fragmentboolean

Indicates whether the component is a fragment. True if the component is a fragment, otherwise false.

embeddedboolean

Indicates whether the component is embedded in another component. True if the component is embedded, otherwise false.

contentLinkUuidstring

Represents a globally unique identifier for every instance of a content component (or fragment) rendered on a page.

dataobject

The configuration data assigned to the component.

localizedboolean

Whether the component has been localized with content in the current locale. If false, the components content will fallback to the default locale.

visibleboolean

Whether the component is visible based on the current visiblity rules and context.

customobject

Any custom data added by the custom code for this component.

designMetadataobject

Design metadata of the component. This includes information about the component type definition needed by the page designer for design-time functionality.

regionsarray<object>

The regions (and their assigned components) for the component.

json
{
  "id": "rfdvj4ojtltljw3",
  "typeId": "commerce_assets.carousel",
  "name": "Topseller Carousel",
  "fragment": false,
  "embedded": false,
  "contentLinkUuid": "0e1f329d4ac66ff2c3bbf70301",
  "data": {
    "title": "Topseller",
    "category": "topseller"
  },
  "localized": true,
  "visible": true,
  "custom": {
    "detailUrl": "www.myshop.com/topseller"
  },
  "designMetadata": {
    "id": "commerce_assets.carousel",
    "name": "Carousel Component",
    "archType": "headless"
  },
  "regions": [
    {
      "id": "tiles",
      "components": [
        {
          "id": "w3reö9wsjf3",
          "typeId": "commerce_assets.productTile",
          "data": {
            "product": "iphone6"
          }
        },
        {
          "id": "cgn8d4ngdl4n",
          "typeId": "commerce_assets.productTile",
          "data": {
            "product": "iphone7"
          }
        }
      ]
    }
  ]
}

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

Get Component — Salesforce Commerce Cloud — Documentation