Skip to main content
Skip to main content

update - Sales Channel Module Reference

This documentation provides a reference to the update method. This belongs to the Sales Channel Module.

update(channelId, data, sharedContext?): Promise<SalesChannelDTO>

This method updates an existing sales channel.

Example

const salesChannel = await salesChannelModuleService.update(
"sc_123",
{
description: "Sales channel for B2B customers",
}
)

Parameters

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

Returns

PromisePromise<SalesChannelDTO>Required
The updated sales channel.

update(selector, data, sharedContext?): Promise<SalesChannelDTO[]>

This method updates existing sales channels matching the specified filters

Example

const salesChannels = await salesChannelModuleService.update(
{
name: "B2B",
},
{
description: "Sales channel for B2B customers",
}
)

Parameters

The filters specifying which sales channels to update.
The attributes to update in the sales channel.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<SalesChannelDTO[]>Required
The updated sales channels.
Was this section helpful?