# Template library

Create reusable document templates for a service, choose which one new documents start from, and reuse designs from the built-in gallery.

Source: https://support.rework.com/article/commerce-template-library

> **In plain words:** A **template** is a saved design for a customer document, such as a quote, an order, an invoice or a receipt. Instead of arranging the same sections on every new document, you design the layout once, save it as a template, and new documents start from it. You keep your templates inside each service. Commerce also ships a gallery of **built-in designs** to start from. New to words like service? See [Commerce basics](https://support.rework.com/article/commerce-basics).

**Where to find it:** there are three places.

- A service's own templates: Commerce > left icon rail > **Settings** > **Services** > open a service > **Documents** (under **Fields & templates**).
  
- Templates shared with every service: the **Template library** page of Commerce Settings. Open it by adding `/settings/template-library` to the end of your Commerce web address (the part before any other path). See "Share a template with every service" below.
  
- While designing a record, the **Templates** tab of the Document Studio shows the same templates.
  

**Who can use it:** workspace admins and service owners.

## Why templates help

Every quote, order, invoice and receipt has a printed or PDF version that your customer sees. Without a template, each new document starts from Commerce's standard layout, and each person adjusts it on their own. With a template, your logo, wording and section order are the same everywhere. A template changes how a document looks. It never changes prices, items, discounts or totals, because those always come from the record.

## Create a template in a service

1. In Commerce, click **Settings** at the bottom of the left icon rail, then **Services**.
   
2. Click the quote, order, invoice or payment service you want. Its settings open in a window. You can also open the service's own list, for example Quote > the service name, and click **Service settings** at the bottom of the left menu.
   
3. In the left list, under **Fields & templates**, click **Documents**. Under **Service templates** you see the templates this service already has.
   
4. Click **New template** (or **Browse designs** when the list is empty). A gallery of **Built-in designs** opens with a preview of each one on a sample document. The text reads "Start from a design: add it as it is, or customize it first."
   
5. Use **Search templates** or the filters to narrow the gallery. Click a design to see a larger preview.
   
6. Choose what you want:
   
   - **Add to templates** keeps the design as it is.
     
   - **Customize…** opens the design in the template designer so you can change it first.
     
7. In the template designer, change the layout, words, colours and logo the same way you would on a record. See [Document Studio](https://support.rework.com/article/commerce-document-studio). You design against a complete sample document, so you do not need a real customer record.
   
8. Type a **Template name** at the top, then click **Done**.
   

![A quote service's Documents section](https://storage.googleapis.com/reworkv3-public/success/261011/UqHaOSRWekjZjk2oL0rAYzv4ckIcud7xTI2bZJ1TkarlMcyJ46mJ5Y4wGGlfiGDT/img.t2aZQz3hPgDEwGh49JX9c7hIPECX72uWY94PwdxuvTeWMaBUm733ptmOCooB2B5g.png)

If your workspace has AI turned on, you also see **Import your design**. It builds a template from a file you already use. Upload a PDF, Word, Excel or image file, or drop it on the box. Commerce reads it and proposes a layout you can adjust.

## Choose what new documents start from

1. On the service's **Documents** section, find the choice **New quote documents start from**. For other services the word quote is replaced by order, invoice or receipt.
   
2. Pick one of your templates, or leave **Built-in default** to use the standard layout.
   

The hint underneath reads "Existing documents keep their design." Only documents created after the change use the new default.

**Worked example.** You have two templates, "Standard proposal" and "Enterprise proposal". Setting "Standard proposal" as the default means every new quote starts with it. A quote you already designed is unchanged.

## Work with a saved template

Each template row shows its name, a **Default** tag if it is the default, an **Imported** tag if it came from a file, the number of sections and when it was last updated.

1. Click **Edit** to open it in the template designer.
   
2. Click the template's actions button (**Template actions**) for more:
   

| 
Action

 | 

What it does

 |
| --- | --- |
| 

**Preview**

 | 

Shows the template on a sample document

 |
| 

**Set as default**

 | 

New documents start from it

 |
| 

**Rename…**

 | 

Changes its name

 |
| 

**Duplicate**

 | 

Makes a copy to try ideas on

 |
| 

**Remove…**

 | 

Deletes it. Documents already designed with it are untouched

 |

If you remove the default, new documents fall back to the built-in layout. A service keeps a limited number of templates, so remove one you no longer use before adding another.

## Save a design from a record

You can also turn the document you are designing on a record into a template.

1. Open the record's **Design document** studio.
   
2. In the left panel, open the **Templates** tab. Your service's templates appear under **This service**, built-in ones under **Built-in**. Click one to use it. The studio says "Applied the template. Undo is available."
   
3. To keep your current design as a template, choose **Save as template…**.
   
4. In the window, pick **Save to**: **New template**, or update one you already have.
   
5. Type a **Template name** and, if you want, turn on **Use as this service's default**.
   
6. Click **Save template** (or **Update template**).
   

Use **Manage templates…** to rename, reorder defaults or remove templates in one place, and **Browse all templates** to open the gallery.

## Share a template with every service

A template made in one service normally stays in that service. If you have several quote services, you would have to copy it into each. The **Template library** page lets you share one template so every service of that kind can use it.

**Where:** the Commerce Settings page at `/settings/template-library` (add it to the end of your Commerce web address). The header reads **Settings** with the subtitle **Template library**. **Who can use it:** workspace admins.

The page has two filters under the header:

- The first picks the kind of document: **Quotes**, **Orders**, **Invoices** or **Receipts**. A line on the right reminds you what sharing means for that kind, for example "Shared with every quote service in this workspace". Receipts are shared with every payment service.
  
- The second picks **Templates** or **Saved sections**. A **saved section** is one section of a document, such as a terms block, that you saved with **Save as section...** in the Document Studio.
  

The table has these columns:

| 
Column

 | 

What it shows

 |
| --- | --- |
| 

**Template**

 | 

The name, with how many sections it has

 |
| 

**Used by**

 | 

**Every service** when nobody changed it. Or "(service) uses its own" / "2 services use their own" when some services saved their own version under the same name

 |
| 

**Updated**

 | 

When it last changed

 |

### Share one

1. Design the template in a service, see "Create a template in a service" above.
   
2. Open the **Template library** page (see "Where" above) and choose the kind of document.
   
3. Click **Share a template**. The **Share a template** dialog opens.
   
4. In **From this service**, pick the service that holds the template.
   
5. In **Template**, pick the template. The hint reads "Its id travels with it, so papers already made from it keep working."
   
6. Click **Share**. A message says "Shared. Every service of this kind can use it now."
   

The template moves to the library and the service's own copy is archived. Documents already made from it keep working. If the service has no template of its own, the dialog says "This service has no template of its own to share."

### Rename or stop sharing

- Click the pencil (**Rename**) on a row, type a new **Name** and click **Save**.
  
- Click the archive icon (**Stop sharing**) and confirm "Stop sharing this template?". Services stop being offered it. Services using their own version keep it, and documents already made from it are untouched. Nothing is deleted.
  

A service can keep its own version of a shared template. To do that, open a document of that service in the Document Studio, apply the shared template, change it, then choose **Update template** (or open the template menu, choose **Save as template…**, pick the shared template under **Save to** and click **Update template**). The service now has its own copy under the same name. From then on, that service uses its own version, and the **Used by** column counts it. Other services keep following the shared one.

A shared saved section is a group of sections you saved once and shared. In the Document Studio of any service of that kind, open the **Add** tab and look under **Saved sections**.

![The Template library page](https://storage.googleapis.com/reworkv3-public/success/261015/4RtJB56z70wTyhA021JUkTZnBfuksCarefS32rMZibt3VbeiVftUyObgzzFDqUHX/img.i9bRGxeyFw2euIQAMshFRwauoeNqvXewnKpne2Ym8bk5Sy45JbIQpZZH5RiNLmHG.png)

## Troubleshooting

| 
Problem

 | 

Why it happens

 | 

What to do

 |
| --- | --- | --- |
| 

New documents ignore my template

 | 

It is not set as the default

 | 

In **Documents**, choose it under **New quote documents start from** or click **Set as default**

 |
| 

An existing document did not change

 | 

A template only seeds new documents

 | 

Open that document's studio and apply the template from the **Templates** tab

 |
| 

I cannot add another template

 | 

The service reached its limit

 | 

Remove or reuse one, then try again

 |
| 

A shared template does not show in a service

 | 

The service uses its own version of it, or the template was stopped being shared

 | 

Check **Used by** in the Template library

 |
| 

The Template library list is empty

 | 

Nothing has been shared yet

 | 

Design a template in a service, then click **Share a template**

 |
