Skip to main content
Skip to main content

deleteCustomerGroups - Customer Module Reference

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

deleteCustomerGroups(groupId, sharedContext?): Promise<void>

This method deletes a customer group by its ID.

Example

await customerModuleService.deleteCustomerGroups(
"cusgroup_123"
)

Parameters

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

Returns

PromisePromise<void>Required
Resolves when the customer group is deleted successfully.

deleteCustomerGroups(groupIds, sharedContext?): Promise<void>

This method deletes customer groups by their IDs.

Example

await customerModuleService.deleteCustomerGroups([
"cusgroup_123",
"cusgroup_321",
])

Parameters

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

Returns

PromisePromise<void>Required
Resolves when the customer groups are deleted successfully.

deleteCustomerGroups(selector, sharedContext?): Promise<void>

This method deletes customer groups matching the specified filters.

Example

await customerModuleService.deleteCustomerGroups({
name: "VIP",
})

Parameters

The filters that specify which customer group to delete.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when the customer groups are deleted successfully.
Was this section helpful?