Discussions

Ask a Question
Back to All

Resolving the name of a Customer Group (non-billing account) from a CustomerGroupId

Hi,

Thanks for the great support provided by this forum.

I am still struggling with one issue - getting the Customer Group name from a CustomerGroupId result.
I'm hoping you can point me in the right direction.

Using the GroupsBridge with the Customer Entity, I can get a list of CustomerIds and related CustomerGroupIds.
I can use the Customer entity to resolve the Customer name.

However, I can't yet find how to resolve the name of the Customer Group(s) linked to the customer.

For example, in the following result, where can I find the NAME of the Customer Group that is CustomerGroupId = 1434?
(Note, IsBillingaccount is false)

{
		"Data": {
			"GroupsBridge": [
				{
					"CustomerId": 3285,
					"CustomerGroupId": 1434,
					"IsBillingAccount": false,
					"IsParentRemoved": false,
					"Id": 9779
				}
			],
			"ConcurrencyId": 6,
			"Id": 3285
		}
	},

The code used to get this sample response (one of many returned) is run using the Query API against the Customer Entity, and is:

{
"QueryExpression": {
"Criteria": {
"Conditions": [
{
"PropertyName": "Id",
"Operator": "GreaterOrEqual",
"Values": [
"0"
]
}
],
"FilterOperator": "And"
},
"Distinct": true,
"PropertySet": {
"Properties": [
"GroupsBridge.*"
]
},
"Count": 4000,
"FirstResultIndex": 1}
}
}

Thanks for any help you can provide.