# Products and pricing

> What a YoPrint line can sell, from supplier catalog styles to fees, decoration services and their price tables, and how YoPrint works out a line's price with pricing groups and pricing rules.

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

A print shop sells two things at once: the goods, such as a tee, and the **decoration** on them, such as a screen-printed logo. In YoPrint the goods are a line's product, and the decoration is a **service** on the line's job. In the web app: **Products**, **Services** and **Product Locations**, with **Pricing groups** in the settings.

## What a line can sell

**Diagram:** A line's product kind is set when the line is added.

- **Line item**
  - **Supplier catalog product**: a style from a connected supplier, such as SanMar, S\&S Activewear or AlphaBroder, in its colors and sizes
  - **Your simple product**: one the shop keeps, in one form
  - **Your variant product**: one the shop keeps in sizes, colors or both, each a **variant**
  - **Custom line item**: anything, with a name and a price
  - **Fee**: a charge on its own, such as a setup charge

The web app calls the shop's own products **simple** and **variant products**. When adding a line, its Add Product dialog filters them as **Custom Simple Product** and **Custom Variant Product**.

Any product line can be marked **customer-supplied**: the shop decorates the customer's own garments, and the product costs nothing.

A shop can **phase out** one of its products. A phased-out product can't go on new lines, but lines that already have it keep working, and publishing an order with one fails until the line is changed. A product can't be deleted while an open order, incoming stock, a pending stock adjustment or transfer, or customer-owned stock uses it.

## Decoration services

A **service** is a way of decorating, such as screen printing or embroidery. The shop sets each one up with:

- **print locations** (service locations in the API), such as front, back or left chest.
- **options**, such as the number of colors, each with its own price table.
- a **price table**: a price for each quantity break.

A service goes on a job, at a print location, and every line in the job takes its decoration price. Its **pricing type** says how locations add up: one price table for every location (`single`), a separate price for each location after the first (`additional`), or one flat total for the run, spread over its pieces (`single_flat`).

## How a line's price is worked out

**Diagram:** Then the job's decoration price is added, and the line's subtotal is the unit price times the quantity.

1. **The price is overridden**: The line charges exactly the price it was given → otherwise
2. **The goods are customer-supplied**: The product costs nothing → otherwise
3. **Calculated**: The cost, marked up by the order's pricing group, or by the first pricing rule that matches

A line keeps both its **price**, what the customer pays, and its **cost**, what the shop pays. From the two, YoPrint works out the line's profit, margin and markup.

## Pricing groups and rules

A **pricing group** holds the markups that turn cost into price: a default markup for catalog products, and price tables by quantity. An order uses one:

**Diagram:** The same customer can be priced differently on one order by changing that order's pricing group.

1. **The order's own**: Chosen on the order → otherwise
2. **The customer's default**: From the customer → otherwise
3. **The team's default**: Marked as default in the settings

**Pricing rules**, on plans that include them, refine a pricing group: each rule has conditions and a price change. YoPrint checks them from the top, and the first rule that both matches and applies to the line's kind of product prices it. When none does, a catalog product gets the group's default markup.

Products, services and pricing fire no events.

## In the API

[Add line items](https://developer.yoprint.com/guides/line-items.md): Add each kind of line, link it to a job, and change lines in bulk.

[Look up products and prices](https://developer.yoprint.com/guides/products-and-catalog.md): Your products, supplier catalog styles, live prices and stock.
