# Attribute Templates

Order attribute templates save commonly used sets of order-level attributes, making it easy to add standardized tracking fields, approval workflows, and metadata to draft orders with a single click.

### What are order attribute templates?

An order attribute template is a saved collection of:

* Attribute keys (field names)
* Default values or placeholders
* Standard metadata for your orders

When you apply a template, all attributes are added to the draft order at once.

\[Screenshot: Order attribute template with multiple attributes]

### Creating attribute templates

#### Access template management

1. Open Draft Order Magic
2. Click **Attribute templates** (or **Templates → Order attributes**) in the navigation
3. Click **Create template**

\[Screenshot: Attribute template management page]

#### Build your template

1. **Name your template** - Use a clear, descriptive name
2. **Add attributes** - Click "Add attribute"
3. **Set keys** - Enter attribute names (e.g., "PO Number", "Sales Rep")
4. **Set default values** - Enter default values or placeholders
5. **Save template**

\[Video: Creating an attribute template - 45 seconds]

### Common template examples

#### Example 1: B2B order tracking

**Template name:** "B2B Order Tracking"

**Attributes:**

* PO Number: \[To be provided]
* Customer Account #: \[Account number]
* Payment Terms: Net 30
* Requested Delivery: \[Date]
* Shipping Account: \[Customer's account or ours]

**Use case:** Every B2B order needs these tracking fields

#### Example 2: Approval workflow

**Template name:** "Manager Approval Required"

**Attributes:**

* Approval Status: Pending
* Submitted By: \[Sales rep name]
* Submitted Date: \[Today's date]
* Approving Manager: \[Manager name]
* Approval Notes: \[Any notes]
* Approved Date: \[Leave blank until approved]

**Use case:** Orders requiring management approval

#### Example 3: Project-based orders

**Template name:** "Project Order Tracking"

**Attributes:**

* Project Code: \[Project ID]
* Project Name: \[Project name]
* Cost Center: \[CC code]
* GL Code: \[General ledger code]
* Department: \[Department name]
* Project Manager: \[PM name]

**Use case:** Orders tied to specific projects or cost centers

#### Example 4: International shipping

**Template name:** "International Export"

**Attributes:**

* Country: \[Destination country]
* Customs Value: \[Total value]
* HS Code: \[Harmonized system code]
* Commercial Invoice: Required
* Shipping Account: \[Customer FedEx/DHL account]
* Incoterms: \[DAP/DDP/FOB]

**Use case:** Export orders needing customs documentation

#### Example 5: Sales tracking

**Template name:** "Sales Rep Tracking"

**Attributes:**

* Sales Rep: \[Rep name]
* Region: \[Geographic region]
* Lead Source: \[Where lead came from]
* Campaign: \[Marketing campaign]
* Customer Type: \[New/Returning/VIP]
* Commission Rate: \[Percentage]

**Use case:** Commission and sales performance tracking

#### Example 6: Rush orders

**Template name:** "Rush Order"

**Attributes:**

* Priority: High
* Rush Fee: $50
* Requested Ship Date: \[Date]
* Expected Delivery: \[Date]
* Fulfillment Team Notified: Yes
* Special Instructions: Rush - Process immediately

**Use case:** Expedited orders needing priority handling

### Using attribute templates

#### Apply a template to a draft order

1. Create or open a draft order in the editor
2. Scroll to the **Order attributes** section
3. Click **Apply template**
4. Select your template from the dropdown
5. All attributes from the template are added to the order
6. Fill in placeholder values
7. Add additional attributes if needed
8. Save the draft order

\[Video: Applying an attribute template - 20 seconds]

#### Customize after applying

After applying a template, you can:

* Fill in placeholders with actual values
* Remove attributes you don't need for this order
* Add additional attributes not in the template
* Modify existing attribute values

{% hint style="info" %}
Like line item templates, attribute templates are copied when applied. Changes to the draft order don't affect the template.
{% endhint %}

### Combining templates

#### Use both line item and attribute templates

On a single draft order:

1. Apply a line item template (adds products)
2. Apply an attribute template (adds order metadata)
3. Customize both as needed
4. Save

**Example:**

* Line item template: "Enterprise SaaS Package"
* Attribute template: "B2B Order Tracking"
* Result: Fully configured enterprise order with tracking

#### Mix templates with manual entry

* Apply a template for standard fields
* Add custom attributes manually for unique situations
* Best of both worlds: speed + flexibility

### Managing templates

#### Edit a template

1. Go to **Attribute templates**
2. Click on the template you want to edit
3. Modify attributes or default values
4. Save changes

{% hint style="warning" %}
Editing a template only affects future uses. Existing draft orders keep their original attribute values.
{% endhint %}

#### Duplicate a template

To create a variation:

1. Find the template to duplicate
2. Click **Duplicate**
3. A copy is created
4. Edit the copy for your new use case
5. Rename appropriately

**Example:**

* Original: "B2B Order Tracking"
* Duplicate to: "B2B Order Tracking - International"
* Add: Customs and shipping attributes

#### Delete a template

1. Go to **Attribute templates**
2. Find the template to delete
3. Click **Delete**
4. Confirm deletion

{% hint style="warning" %}
Deleted templates cannot be recovered. Existing draft orders keep their attributes, but you can't apply the template to new orders.
{% endhint %}

### Best practices

#### Template naming

Use clear names that indicate purpose:

✅ **Good names:**

* "B2B Order Tracking"
* "Manager Approval Workflow"
* "International Export"
* "Project-Based Orders"
* "Rush Order Priority"

❌ **Poor names:**

* "Template 1"
* "Attributes"
* "Stuff"
* "Test"

#### Attribute key naming

Use consistent, descriptive keys:

✅ **Good keys:**

* "PO Number"
* "Sales Rep"
* "Approval Status"
* "Project Code"

❌ **Poor keys:**

* "po"
* "rep"
* "approval"
* "code"

{% hint style="success" %}
Use Title Case for attribute keys to maintain a professional appearance and consistency across all orders.
{% endhint %}

#### Default values vs. placeholders

Choose appropriate defaults:

**Use actual defaults when:**

* Value is almost always the same
* User can override if needed
* Example: "Payment Terms: Net 30"

**Use placeholders when:**

* Value varies per order
* Reminds user what to enter
* Example: "PO Number: \[Customer will provide]"

**Placeholder formatting:**

* `[To be provided]` - User must fill in
* `[Optional]` - User can leave blank
* `[8x10 / 11x14 / 16x20]` - Shows options
* `[Contact: name@email.com]` - Instructions with example

#### Organizing templates

Group templates by use case:

**By workflow:**

* "Standard Order"
* "Approval Required"
* "Rush Order"

**By customer type:**

* "B2B Tracking"
* "B2C Tracking"
* "Wholesale"

**By department:**

* "Sales Team"
* "Custom Orders Team"
* "International Team"

#### Regular maintenance

Review templates periodically:

* Update sales rep names if staff changes
* Revise workflow steps if processes change
* Add new tracking fields as needed
* Remove obsolete attributes

### Workflow automation ideas

#### Multi-stage approval

Create templates for each approval stage:

**"Stage 1 - Initial Review"**

* Status: Pending initial review
* Reviewer: \[Sales manager]
* Review date: \[Date]

**"Stage 2 - Final Approval"**

* Status: Pending final approval
* Approver: \[Director]
* Final approval date: \[Date]

Apply appropriate template as order progresses.

#### Customer tier tracking

**"VIP Customer"**

* Customer Tier: VIP
* Account Manager: \[Name]
* Priority: High
* Special Discounts: Applied

**"Standard Customer"**

* Customer Tier: Standard
* Account Manager: Support team
* Priority: Normal

#### Seasonal tracking

**"Holiday Season 2026"**

* Season: Holiday 2026
* Expected Delivery: \[Before Dec 20]
* Gift Wrap Available: Yes
* Rush Shipping: Available

### Integration with Shopify Flow

If you use Shopify Plus with Shopify Flow, combine templates with automation:

1. **Apply attribute template** with "Approval Status: Pending"
2. **Shopify Flow watches** for this attribute
3. **When status changes** to "Approved", Flow triggers actions:
   * Tag the order
   * Notify fulfillment team
   * Send customer email
   * Update ERP

### Reporting with templates

Templates ensure consistent data for reporting:

#### Export and analyze

1. All orders using the same template have the same attribute keys
2. Export orders from Shopify
3. Attributes appear as columns
4. Filter, sort, and analyze easily

#### Common reports

Because attributes are consistent:

* **Orders by sales rep** - Filter "Sales Rep" column
* **Orders by project** - Group by "Project Code"
* **Approval pipeline** - Filter "Approval Status"
* **Rush orders** - Filter "Priority: High"

### Troubleshooting

#### Template won't save

* Ensure template has a name
* Check that attribute keys aren't too long (< 50 characters)
* Verify no special characters causing issues
* Try refreshing the page

#### Attributes not appearing when applied

* Make sure you clicked "Apply template" not just opened it
* Check that you saved the draft order after applying
* Verify you're looking in the order attributes section
* Try applying the template again

#### Can't find my template

* Verify you're in "Attribute templates" not "Line item templates"
* Use search if available
* Check if template was accidentally deleted
* Ensure you're on the correct Shopify store

#### Wrong values in template

* Edit the template to fix default values
* Changes only affect future applications
* Existing orders keep their current attribute values

[More troubleshooting →](https://github.com/horselditty/draft-order-docs/blob/main/support/troubleshooting/README.md)

### Advanced use cases

#### ERP integration tracking

**"ERP Sync Tracking"**

* ERP Order ID: \[Auto-populated by integration]
* Sync Date: \[Date/time]
* Sync Status: Pending
* ERP Invoice #: \[Generated after sync]

#### Compliance and audit trails

**"Audit Trail"**

* Created By: \[User email]
* Created Date: \[Timestamp]
* Last Modified By: \[User email]
* Last Modified Date: \[Timestamp]
* Modification Reason: \[Why order was changed]

#### Customer-specific metadata

**"ACME Corp - Standard Fields"**

* Customer: ACME Corp
* Account #: ACME-001
* Payment Terms: Net 45
* Shipping: Customer UPS account
* Contact: Jane Smith

### What's next?

Create reusable product bundles Learn more about order attributes Master the full editor Set unique prices per order


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://responsive-media.gitbook.io/draft-order-magic/templates/attribute-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
