younifyd
Menu

Get Customer Groups

Get a list of customer groups.

GET/organizations/{organizationId}/customer-groups

Use it in a workflow

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

Request

Path parameters

organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

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.

selectstring

The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html).

limitinteger (int32)

Maximum records to retrieve per request, not to exceed 50. 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 {{getCustomerGroups.response.data.<field>}}.

dataarray<object>

The list of customer groups.

creationDatestring (date-time)

The date the customer group was created.

descriptionstring

Customer Group description.

idstringrequired

Customer Group id.

inDeletionboolean

Boolean to indicate if the customer group is marked for deletion.

lastModifiedstring (date-time)

The date the customer group was last modified.

memberCountinteger (int32)

Number of members in the customer group

ruleobject1 fields

Customer Group Rule

typestring

Customer Group Type.

One ofsystemdynamicstatic

json
{
  "data": [
    {
      "id": "Big Spenders",
      "creationDate": "9999-12-31T00:00:00.0Z",
      "description": "Customers who spent more than $1000 in last month",
      "inDeletion": false,
      "lastModified": "9999-12-31T00:00:00.0Z",
      "memberCount": 109,
      "rule": {
        "description": "Customers who spend more than $1000 in the last month"
      },
      "type": "static"
    }
  ]
}

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