Skip to main content
Skip to main content

updateCustomerGroups - Customer Module Reference

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

updateCustomerGroups(groupId, data, sharedContext?): Promise<CustomerGroupDTO>

This method updates an existing customer group.

Example

const customerGroup =
await customerModuleService.updateCustomerGroups(
"cusgroup_123",
{
name: "Very Important",
}
)

Parameters

groupIdstringRequired
The group's ID.
The attributes to update in the customer group.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CustomerGroupDTO>Required
The updated customer group.

updateCustomerGroups(groupIds, data, sharedContext?): Promise<CustomerGroupDTO[]>

This method updates existing customer groups.

Example

const customerGroups =
await customerModuleService.updateCustomerGroups(
["cusgroup_123", "cusgroup_321"],
{
name: "Very Important",
}
)

Parameters

groupIdsstring[]Required
The IDs of customer groups.
The attributes to update in the customer groups.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CustomerGroupDTO[]>Required
The updated customer groups.

updateCustomerGroups(selector, data, sharedContext?): Promise<CustomerGroupDTO[]>

This method updates existing customer groups.

Example

const customerGroups =
await customerModuleService.updateCustomerGroups(
{
name: "VIP",
},
{
name: "Very Important",
}
)

Parameters

The filters that specify which customer groups should be updates.
The attributes to update in the customer groups.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<CustomerGroupDTO[]>Required
The updated customer groups.
Was this section helpful?