Skip to main content
Skip to main content

listCustomerGroupCustomers - Customer Module Reference

This documentation provides a reference to the listCustomerGroupCustomers method. This belongs to the Customer Module.

This method retrieves a paginated list of relations between customer and groups based on optional filters and configuration.

Example

To retrieve a list of customer-group relations using their IDs:

const customerGroupCustomerRels =
await customerModuleService.listCustomerGroupCustomers({
id: ["cusgc_123"],
})

To specify relations that should be retrieved within the customer-group relations:

const customerGroupCustomerRels =
await customerModuleService.listCustomerGroupCustomers(
{
id: ["cusgc_123"],
},
{
relations: ["customer", "customer_group"],
}
)

By default, only the first 15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:

const customerGroupCustomerRels =
await customerModuleService.listCustomerGroupCustomers(
{
id: ["cusgc_123"],
},
{
relations: ["customer", "customer_group"],
take: 20,
skip: 2,
}
)

Parameters

The filters to apply on the retrieved customer-group relations.
The configurations determining how the customer-group relations is retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a customer-group relations.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CustomerGroupCustomerDTO[]>Required
The list of customer-group relations.
Was this section helpful?