Supermatic Docs

@supermatic/shopify/tag

add

Add tags to a customer or an order.

add(
  storeName: string, // The name of your store.
  id: string, // The global ID of the customer or order.
  tags: string[] // The tags you want to add.
): Promise<null>

Example

import tag from "@supermatic/shopify/tag";

await tag.add(
  "examplestore",
  "gid://shopify/Customer/123",
  ["Big spender"]
);

list

List tags for a customer or an order.

add(
  storeName: string, // The name of your store.
  id: string // The global ID of the customer or order.
): Promise<string[]>

Example

import tag from "@supermatic/shopify/tag";

await tag.list(
  "examplestore",
  "gid://shopify/Customer/123"
);

remove

Remove tags from a customer or an order.

remove(
  storeName: string, // The name of your store.
  id: string, // The global ID of the customer or order.
  tags: string[] // The tags you want to remove.
): Promise<null>

Example

import tag from "@supermatic/shopify/tag";

await tag.remove(
  "examplestore",
  "gid://shopify/Customer/123",
  ["Big spender"]
);