linkCustomerGroupsToCustomerStepId (steps/link-customer-groups-customer.ts)

medusa · packages/core/core-flows/src/customer-group/steps/link-customer-groups-customer.ts · typescript · MIT
crm

Module exposing: linkCustomerGroupsToCustomerStepId, linkCustomerGroupsToCustomerStep

// Source: https://github.com/medusajs/medusa | License: MIT | Copyright 2021 Medusajs
// Provided via justclaw.it.com; keep this notice with the code.
import {
  ICustomerModuleService,
  LinkWorkflowInput,
} from "@medusajs/framework/types"
import { Modules, promiseAll } from "@medusajs/framework/utils"
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"

export const linkCustomerGroupsToCustomerStepId =
  "link-customers-to-customer-group"
/**
 * This step manages the customer groups of a customer.
 * 
 * @example
 * const data = linkCustomerGroupsToCustomerStep({
 *   id: "cus_123",
 *   add: ["cusgrp_123"],
 *   remove: ["cusgrp_456"]
 * })
 */
export const linkCustomerGroupsToCustomerStep = createStep(
  linkCustomerGroupsToCustomerStepId,
  async (data: Link

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key