# How YoPrint works

> The records a print shop works with in YoPrint, from the first quote to the last payment, how they connect, and the words the API uses for them.

Web page: https://developer.yoprint.com/how-yoprint-works/

YoPrint runs a print shop's work, from the first quote to the last payment. The API works on the same records the shop uses in the web app, with the same rules. Once you know these records and how they connect, every guide and reference page reads the same way.

## An order's journey

**Diagram:** A typical order. Invoices and payments can come at any point: many shops take a deposit before production starts.

1. **A customer asks: a quote**: The shop prices the work, publishes the quote and sends it for approval
2. **The customer says yes: a sales order**: Converting the quote makes it a sales order. It stays the same record, with the same id
3. **The shop makes it: jobs and tasks**: Each job is one piece of production work, broken into tasks such as "burn screens" and "print"
4. **It goes out: shipments**: Packages with carrier labels, for some or all of the order's lines
5. **The shop bills: invoices**: Each invoice bills some or all of the order's lines
6. **The customer pays: payments**: Recorded on the order, then counted against its invoices

## What an order holds

Everything in the journey hangs off one sales order, which belongs to one customer:

**Diagram:** In the API reference, line items and approvals are under Sales orders. Jobs, shipments, invoices and payments have their own sections.

- **Customer**, with contacts, addresses and the defaults new orders take
  - **Sales order** or **quote**: one record, with a type
    - **Line items**, what's sold: products, custom items and fees
    - **Jobs** of production work, each with its **tasks**
    - **Approvals** of artwork and quotes, answered by the customer
    - **Shipments**, each with its **packages** and their labels
    - **Invoices**, each with its own **lines** that point at the order's lines
    - **Payments**, recorded on the order

Around the orders, the shop keeps its **products** and **decoration services** (what it sells and how it prices them), its **vendors** and **purchase orders** (what it buys), and its **team settings**, such as statuses, task presets, taxes and payment terms.

## Draft, then published

Every quote and sales order starts as a **draft**: a private workspace where the shop builds it. A draft has no history, fires no `order.created` or `quote.created`, and takes no approvals, payments or GoShippo labels. **Publishing** makes it real: in the web app, the **Publish** button.

**Diagram:** Publishing checks the order first: a customer, at least one line, products that can still be sold, and a pricing group that hasn't been removed.

1. **Draft**: Being built: lines, prices, dates → publish
2. **Published**: Real: history, webhooks, approvals, payments, labels

**Statuses** are a separate thing. Each team names its own, such as "Pending approval" or "In production", and moves records through them. Every order has a status, even a draft, and what an order allows depends on draft or published, not on its status. See [Quotes and sales orders](https://developer.yoprint.com/how-yoprint-works/quotes-and-sales-orders.md).

## Words you'll meet

The API sometimes uses another word than the web app. Both are listed, so you can match what a shop tells you to what the reference says.

| Word                   | What it means                                                                                                                                                                                                                            | Also called                                             |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| **Team**               | One shop in YoPrint, with its own data, people and settings.                                                                                                                                                                             | Team ID in Profile, `team_slug` in paths                |
| **Draft**              | An order or quote that hasn't been published.                                                                                                                                                                                            |                                                         |
| **Publish**            | Make a draft real: it gets history, webhooks, approvals and payments.                                                                                                                                                                    |                                                         |
| **Status**             | A team-defined stage, such as "In production". Quotes, sales orders, jobs, shipments, purchase orders and message threads each have their own list, and tasks use their task preset's.                                                   | `status_id`                                             |
| **Document number**    | The number people see, such as `SO1001`. Not an id.                                                                                                                                                                                      | `scoped_id`                                             |
| **Line item**          | One thing sold: a product in its sizes and quantities, a custom item or a fee. Decoration isn't a line: it's a service on the job, priced into the job's lines. Invoices and shipments have lines too, which point at the order's lines. | `items`, order item                                     |
| **Job**                | One piece of production work on an order, such as "front logo on 48 tees". It holds the lines made together.                                                                                                                             |                                                         |
| **Task**               | One step of a job, such as "print".                                                                                                                                                                                                      | Work pipeline                                           |
| **Task preset**        | A kind of task the team defines in its settings, with its own statuses.                                                                                                                                                                  | Pipeline, `pipeline_id`                                 |
| **Job preset**         | A ready-made job, copied onto an order with its services, tasks and files.                                                                                                                                                               | Job template                                            |
| **Decoration service** | A way of decorating, such as screen printing, with its price tables.                                                                                                                                                                     | Service                                                 |
| **Print location**     | Where on the garment a service goes, such as the front.                                                                                                                                                                                  | Service location                                        |
| **Location**           | One of the shop's addresses, where it keeps stock and ships from.                                                                                                                                                                        | Warehouse, company location                             |
| **Pricing group**      | The markups that turn a product's cost into its price.                                                                                                                                                                                   |                                                         |
| **Approval**           | A request for the customer to approve artwork or a quote, answered in the Customer Portal.                                                                                                                                               |                                                         |
| **Customer Portal**    | The website where a shop's customers view their quotes and orders, approve them and pay.                                                                                                                                                 |                                                         |
| **Brand profile**      | The name, logo and Ship From address an order's documents and shipments use.                                                                                                                                                             | Customer profile                                        |
| **Payment terms**      | Whether there's a deposit, and when the deposit and the full amount are due.                                                                                                                                                             |                                                         |
| **Deposit**            | The part of an order the customer pays first.                                                                                                                                                                                            |                                                         |
| **Balance due**        | What's left to pay on the order's invoices: invoiced minus paid.                                                                                                                                                                         | `order_balance_due`                                     |
| **Payment link**       | How a payment is split across an order's invoices. Not a page the customer opens: it moves no money.                                                                                                                                     | Payment allocation in the web app                       |
| **Store credit**       | A balance on a customer's account that pays for orders.                                                                                                                                                                                  | Customer credit, `wallet_fund`, Customer Fund in Zapier |
| **GoShippo**           | The shipping-label service a team connects to buy labels and get rates. The company is Shippo.                                                                                                                                           | `goshippo` in paths                                     |

## Read on

[Customers](https://developer.yoprint.com/how-yoprint-works/customers.md): Contacts, addresses, defaults and store credit.

[Products and pricing](https://developer.yoprint.com/how-yoprint-works/products-and-pricing.md): What a line can sell, decoration services, and how prices are worked out.

[Quotes and sales orders](https://developer.yoprint.com/how-yoprint-works/quotes-and-sales-orders.md): Draft, publish, convert, statuses, approvals and the Customer Portal.

[Production](https://developer.yoprint.com/how-yoprint-works/production.md): Jobs, tasks, task presets, statuses and the schedule.

[Shipping](https://developer.yoprint.com/how-yoprint-works/shipping.md): Shipments, the packages their labels make, and shipping costs.

[Invoices and payments](https://developer.yoprint.com/how-yoprint-works/invoices-and-payments.md): Invoices, deposits, payments, credit and the balance.

[Purchasing and stock](https://developer.yoprint.com/how-yoprint-works/purchasing-and-stock.md): Vendors, purchase orders, receiving and stock.
