AbsoluteJS

@absolutejs/commerce-customcat

@absolutejs/commerce-customcatv0.6.20-beta.6betaCommerce & Growth

CustomCat print-on-demand fulfillment adapter for @absolutejs/commerce

#Installation

BASH
bun add @absolutejs/commerce-customcat

#Capabilities

Overview

CustomCat print-on-demand fulfillment adapter for @absolutejs/commerce.

Use createCustomCatCatalog() for normalized catalog browsing, live SKU availability, and read-only fulfillment cost preflight. Preflight refreshes the selected SKUs and shipping cost, includes CustomCat's documented back-print adjustment, and returns item/shipping/adjustment totals. It does not reserve inventory or price; refresh it immediately before creating spend authority. The same provider exposes paginated free-text catalog search and destination- aware shipping-method discovery. CustomCat does not expose server-side catalog search, so a search walks its paginated catalog before returning normalized matches; ordinary browsing remains a single provider page request. Set categories: "all" to discover CustomCat's category/subcategory taxonomy and traverse every returned category with opaque cursors instead of hardcoding its current category list.

The adapter uses CustomCat's external-design workflow: every line supplies an exact catalog_sku plus a public PNG/JPG artwork URL. Front and back artwork are supported. Set sandbox: true until the account is ready to create paid production orders.

Show 5 more

API keys are merchant scoped. Multi-tenant platforms should resolve the key from their secret store per fulfillment account; never persist keys in catalog or fulfillment settings JSON.

Catalog synchronization preserves closeouts with no orderable SKUs as archived products with zero variants. Supplier color hex values and retail prices are retained when present; no SKU, price, stock, or decoration calibration is fabricated.

getProductInventory(externalId) returns stock for every SKU of one product in one request. Use it with commerce's refreshCatalogInventory for efficient, bounded background refreshes. getInventory(skus) remains available for targeted SKU lookups. Missing stock fields are not converted into positive observations; stock results include the time the API response was received. HTTP requests have a configurable timeoutMs (30 seconds by default).

Complete inventory refresh

getCatalogInventory() reads a fresh, paginated catalog snapshot. Unlike product-detail lookups, this includes discontinued variants with explicit zero stock. Unknown stock remains unknown. Commerce 0.40.1-beta.56 or later uses this snapshot once per refresh; earlier runners keep their existing per-product behavior.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/commerce-customcat through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/commerce-customcat version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/commerce-customcat example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/commerce-customcat quick start

Partial snippet

# @absolutejs/commerce-customcat

TS
import { createCustomCatFulfillment } from "@absolutejs/commerce-customcat";

const fulfillment = createCustomCatFulfillment({
  apiKey: process.env.CUSTOMCAT_API_KEY!,
  sandbox: true,
});

await fulfillment.submitOrder({
  externalOrderId: "ORDER-1001",
  recipient,
  lines,
  shippingMethod: "Economy",
});

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/commerce-customcat@absolutejs/commerce-customcat/manifest@absolutejs/commerce-customcat/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build ./src/index.ts ./src/manifest.ts --root ./src --outdir dist --target bun --external @absolutejs/commerce --external '@absolutejs/commerce/*' --external @absolutejs/execution --external '@absolutejs/execution/*' --external @absolutejs/manifest --external @sinclair/typebox && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit
bun run check:packagebun run format && bun run typecheck && bun run test && bun run verify-package && bun run build
bun run formatprettier --write "./**/*.{js,ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit