younifyd
Menu

Update Site Preference

Update Site Preference

PATCH/organizations/{organizationId}/site-preference-groups/{groupId}/{instanceType}/preferences/{preferenceId}

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Update Site Preference action (under Preferences (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{updateSitePreference.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).

groupIdstringrequired

The preference group ID.

instanceTypestringrequired

The instance type for which to read or update preferences.

One ofstagingdevelopmentsandboxproduction

preferenceIdstringrequired

The preference attribute ID.

Query parameters

maskPasswordsboolean

The preference values of type Password are masked when set.

Default false

Request body

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

idstringrequired

The preference attribute ID

descriptionobject
displayNameobject
attributeDefinitionobject

Document representing an attribute definition

idstringrequired

The user supplied ID of the attribute

effectiveIdstring

The effective ID, which is c_id if the attribute is custom, and just the id otherwise

displayNameobject
descriptionobject
keyboolean

Flag indicating if this is a key attribute

mandatoryboolean

Flag indicating if a value is mandatory for the attribute

localizableboolean

Flag indicating if this attribute can be localized

siteSpecificboolean

Flag indicating if this attribute is site-specific

searchableboolean

Flag indicating if this attribute is searchable

queryableboolean

Returns true if the attribute definition is explicitly marked queryable or if the attribute value type belongs to a queryable type. Computed and read-only.

valueTypestring

The type of an attribute value

One ofstringintdoubletexthtmldateimagebooleanmoneyquantitydatetimeemailpasswordset_of_stringset_of_intset_of_doubleenum_of_stringenum_of_int

visibleboolean

Flag indicating if this attribute is visible

systemboolean

Flag indicating if this attribute is a system attribute

unitobject
requiresEncodingboolean

Flag indicating if this attribute can be encoded using the encoding='off' flag in ISML templates

multiValueTypeboolean

True if the attribute can have multiple values. Applicable to set_of_* and enum_of_* types.

setValueTypeboolean

Flag indicating if this attribute is of type 'Set of'

externallyManagedboolean

Flag indicating if this attribute is externally managed

externallyDefinedboolean

Flag indicating if this attribute is externally defined

orderRequiredboolean

Flag indicating if this attribute is required for order of the attribute model's product

regularExpressionstring

A regular expression that defines the legal values for this attribute

fieldLengthinteger (int32)

The length of the field for this attribute in the editor

fieldHeightinteger (int32)

The height of the field for this attribute in the editor

minLengthinteger (int32)

The minimum length of the field for this attribute

readOnlyboolean

Flag indicating if this attribute is read-only

minValuenumber (double)

The minimum possible value for this attribute

maxValuenumber (double)

The maximum possible value for this attribute

scaleinteger (int32)

The minimum number of fraction digits for a value of this attribute

defaultValueany

The default value of this attribute. It can be updated, but not created.

valueDefinitionsarray<object>5 fields

A set of values that are possible for this attribute

creationDatestring (date-time)

The date/time when the attribute definition was created

lastModifiedstring (date-time)

The date/time when the attribute definition was last modified

siteValuesobject

A mapping of site IDs to their preference values.

valueTypestring

The type of an attribute value

One ofstringintdoubletexthtmldateimagebooleanmoneyquantitydatetimeemailpasswordset_of_stringset_of_intset_of_doubleenum_of_stringenum_of_int

json
{
  "id": "WapiStringAttr",
  "description": {},
  "displayName": {},
  "attributeDefinition": {
    "id": "color",
    "effectiveId": "c_color",
    "displayName": {
      "default": "Product",
      "de": "Produkt",
      "en": "Product"
    },
    "description": {
      "default": "Object type representing products.",
      "de": "Objekttyp, der Produkte repräsentiert.",
      "en": "Object type representing products."
    },
    "key": false,
    "mandatory": false,
    "localizable": false,
    "siteSpecific": false,
    "searchable": true,
    "queryable": true,
    "valueType": "string",
    "visible": true
  },
  "siteValues": {},
  "valueType": "string"
}

Response

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

idstring

The preference attribute ID

descriptionobject
displayNameobject
attributeDefinitionobject

Document representing an attribute definition

idstringrequired

The user supplied ID of the attribute

effectiveIdstring

The effective ID, which is c_id if the attribute is custom, and just the id otherwise

displayNameobject
descriptionobject
keyboolean

Flag indicating if this is a key attribute

mandatoryboolean

Flag indicating if a value is mandatory for the attribute

localizableboolean

Flag indicating if this attribute can be localized

siteSpecificboolean

Flag indicating if this attribute is site-specific

searchableboolean

Flag indicating if this attribute is searchable

queryableboolean

Returns true if the attribute definition is explicitly marked queryable or if the attribute value type belongs to a queryable type. Computed and read-only.

valueTypestring

The type of an attribute value

One ofstringintdoubletexthtmldateimagebooleanmoneyquantitydatetimeemailpasswordset_of_stringset_of_intset_of_doubleenum_of_stringenum_of_int

visibleboolean

Flag indicating if this attribute is visible

systemboolean

Flag indicating if this attribute is a system attribute

unitobject
requiresEncodingboolean

Flag indicating if this attribute can be encoded using the encoding='off' flag in ISML templates

multiValueTypeboolean

True if the attribute can have multiple values. Applicable to set_of_* and enum_of_* types.

setValueTypeboolean

Flag indicating if this attribute is of type 'Set of'

externallyManagedboolean

Flag indicating if this attribute is externally managed

externallyDefinedboolean

Flag indicating if this attribute is externally defined

orderRequiredboolean

Flag indicating if this attribute is required for order of the attribute model's product

regularExpressionstring

A regular expression that defines the legal values for this attribute

fieldLengthinteger (int32)

The length of the field for this attribute in the editor

fieldHeightinteger (int32)

The height of the field for this attribute in the editor

minLengthinteger (int32)

The minimum length of the field for this attribute

readOnlyboolean

Flag indicating if this attribute is read-only

minValuenumber (double)

The minimum possible value for this attribute

maxValuenumber (double)

The maximum possible value for this attribute

scaleinteger (int32)

The minimum number of fraction digits for a value of this attribute

defaultValueany

The default value of this attribute. It can be updated, but not created.

valueDefinitionsarray<object>5 fields

A set of values that are possible for this attribute

creationDatestring (date-time)

The date/time when the attribute definition was created

lastModifiedstring (date-time)

The date/time when the attribute definition was last modified

siteValuesobject

A mapping of site IDs to their preference values.

valueTypestring

The type of an attribute value

One ofstringintdoubletexthtmldateimagebooleanmoneyquantitydatetimeemailpasswordset_of_stringset_of_intset_of_doubleenum_of_stringenum_of_int

json
{
  "id": "WapiStringAttr",
  "description": {},
  "displayName": {},
  "attributeDefinition": {
    "id": "color",
    "effectiveId": "c_color",
    "displayName": {
      "default": "Product",
      "de": "Produkt",
      "en": "Product"
    },
    "description": {
      "default": "Object type representing products.",
      "de": "Objekttyp, der Produkte repräsentiert.",
      "en": "Object type representing products."
    },
    "key": false,
    "mandatory": false,
    "localizable": false,
    "siteSpecific": false,
    "searchable": true,
    "queryable": true,
    "valueType": "string",
    "visible": true
  },
  "siteValues": {},
  "valueType": "string"
}

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