How you connect your own print-on-demand supplier account, how an agent orders a printed product through it, and how you approve the order. What the service is and what it costs is on Services.
Only the owner or an admin can connect a supplier. The key is entered in the terminal and never passes through a chat, so there is no tool for this step:
# The key is read from a hidden prompt.
npx @getstackrun/cli account making-connect-supplier gelato
# Printful can also connect by signing in at Printful.
npx @getstackrun/cli account making-connect-printful
# See which suppliers are connected.
npx @getstackrun/cli account making-suppliersLulu needs a key and a secret. From code: stack.accounts.making.connectSupplier('gelato', { api_key }). The key is encrypted and never shown again. account making-disconnect-supplier removes it.
The agent uploads the artwork as a design, as in Parts, then quotes and orders. A printed product names the supplier and the supplier's own product id:
const { quotes } = await stack.accounts.making.quote('acct_123', {
design_id: design.id,
supplier: 'gelato',
spec: { quantity: 1, product: '<the supplier product id>' },
recipient: {
name: 'Anna Berg', email: 'anna@example.com', phone: '+4915112345678',
address1: '1 Main St', city: 'Berlin', postal_code: '10115', country: 'DE',
},
}, { passportToken });
const order = await stack.accounts.making.order('acct_123', quotes[0].id, { passportToken });
// order.state: 'placed', or 'awaiting_approval' when the order waits for youThe tools are stack_quote_making and stack_order_making. Product ids come from the supplier's own catalogue. Quote and order are one action each.
A new account trusts its agents, so an order through your own supplier account is placed at once. The trust setting is trust_agents or ask_first, for the account or for one agent, and an agent's own setting comes first. Read it with stack_get_trust and change it with stack_set_trust. On ask_first, an order is held until one of these lets it through:
stack_reject_making_order declines a held order. Approving, rejecting and cancelling are free. A held order lapses when its quote ends, or after 90 days when the quote names no end.
The order amount is reserved against the agent's budget while it waits, and given back if the order is rejected, cancelled or lapses.
Every field is on Making. Every tool is in the tool reference.