Skip to main content

Triggers

Generate X type of document when Y trigger runs

This article explains which SmartBill documents the app creates and when: document types, triggers, exceptions, email sending and linked documents. The app always uses the Shopify order data as it is when the document is created.

📄 Available document types (WHAT to generate)

The app can create these documents in SmartBill:

1

Invoice / Factura

2

Proforma / Factura proforma

3

Credit note / Factura storno

✅ What a document needs

A document is created automatically only if your SmartBill account is connected and the trigger of that document isn’t Never.

Never only stops automatic creation: you can still create the document by hand. On the Start plan you can create only invoices by hand, and credit notes can never be created by hand.

If something is missing, the Monitor shows the error and how to fix it. See Looking up an error code.

⚡ Triggers (WHEN to generate)

For each document type, choose the event that creates it. Each document type is created automatically only once per order.

Manual generation: you can also create documents one by one from your Shopify orders. Learn more

Document triggers

For the invoice and the proforma:

⚡ Trigger 1 » Never

The document is never created automatically.

⚡ Trigger 2 » When unpaid order is created

The document is created when an unpaid order is created (or imported).

Only orders with Payment pending status count. Authorized or partially paid orders don’t get a document from this trigger, not even later.

⚡ Trigger 3 » When order is paid

The document is created when

  • a paid order is created (or imported), or

  • an unpaid order becomes paid.

⚡ Trigger 4 » When order is fulfilled

The document is created when

  • a fulfilled order is created (or imported), or

  • an unfulfilled order becomes fulfilled.

⚡ Trigger 5 » When any order is created

The document is created when any order is created (or imported).

Credit note triggers

A credit note in SmartBill is an invoice with negative amounts (partial refund) or a storno (full refund or cancellation).

⚡ Trigger 1 » Never

No credit note is created automatically, whatever the refunds or cancellations.

⚡ Trigger 2 » When order is partially or fully refunded

When products or shipping are refunded in Shopify, the app creates a correction document. Only the refunded items are on it, with the refunded quantity, at the price the customer paid (after discounts).

  • Partial refund: SmartBill creates an invoice with negative amounts. Items that didn’t change aren’t on it.

  • Full refund: SmartBill creates a credit note (storno). A refund is full when it refunds the whole order total, or returns the whole order with nothing left to pay (for example, a returned cash-on-delivery order). One storno per order.

⚡ Trigger 3 » When order is canceled

When the order is cancelled, the app creates a credit note (storno) for the whole order.

Set it up

Open SmartBill | Integration app » Settings menu » Triggers section » Invoice field (or Proforma, Credit note) » choose a trigger » Save

Good to know

  • To create a document again for the same order, use manual generation.

  • By default, the invoice is set to When any order is created. The proforma and the credit note are set to Never.

✅ POS orders

POS orders (sales in your Shopify POS) get documents like web orders: the same triggers, document types and settings apply.

  • The document is created 60 seconds after the sale, from the order data at that time, so Shopify can add the customer to the order first. Credit notes (cancellation, refund) don’t wait.

  • With a customer on the order, the document uses the customer’s details, like a web order.

  • Without a customer, see POS orders without customer data.

✅ Credit note details

SmartBill credit notes are created only for invoices created by the app. The corrected items show with negative amounts.

How it works

  • The price is the price the customer paid, after discounts.

  • Numbering: a partial credit note uses the invoice numbering series you selected in Settings. For a full storno, SmartBill sets the series from the original invoice. See Numbering series.

  • Language: a partial credit note uses your Default document language.

  • If Email this document to the customer is ticked for credit notes and SmartBill email is set up, SmartBill emails it.

  • A partial credit note has no payment method. For a full storno, SmartBill makes it from the original invoice.

Order adjustment limitation

SmartBill credit notes don’t support order adjustments. If you refund in Shopify only an amount, without picking a product or shipping, the credit note can’t be created, and the Monitor may show an error for it. Make this correction by hand in SmartBill. If the amount is the full order total, it counts as a full refund, and the app creates a storno for the whole order.

✅ Draft, archived and cancelled orders

The app doesn’t check the order status: if a trigger runs, the document is created.

  • Draft orders never get a document: a draft becomes an order only when you complete it.

  • Archived (closed) orders still get their documents, for example POS orders, which Shopify archives right away.

  • Cancelled orders usually get none, because no trigger runs after an order is cancelled. If the order is cancelled during a trigger delay, the document is still created.

  • Manual generation works for every order.

🚫 Skip orders and Generate for

Choose which orders never get an automatic document, and whether the invoice and the proforma are made for everyone, only companies or only individuals.

Skip these orders

Pick orders that never get an automatic document, whether the customer is a company (B2B) or an individual (B2C). You find it at the bottom of the Triggers card in Settings. You can skip orders when:

  • the order has a tag: one of your tags, exact match (upper or lower case doesn’t matter),

  • the order comes from POS (in-store),

  • the order is paid with a selected payment method: Cash on delivery (COD), PayPal or Bank transfer,

  • the order contains only gift cards (an order paid with a gift card isn’t skipped),

  • the order total is 0.

If one of them matches, the Monitor shows No document with the reason, for example Skipped by your exception: order is paid with …. You can still create the document by hand with Generate document.

Payment method

  • Cash on delivery and Bank transfer are Shopify’s built-in manual payment methods (Cash on Delivery, Bank Deposit). A manual payment method you created with your own name can’t be recognised.

  • PayPal means PayPal Express. PayPal paid through Shopify Payments can’t be recognised, so the document is created.

  • Card payments (also Apple Pay, Google Pay and Shop Pay) can’t be chosen: Shopify shows them all as Shopify Payments.

  • An order paid in parts is skipped only if every part was paid with a selected method. If any part was paid another way (for example gift card + COD), the document is created. The Monitor lists all the methods.

Tags

With a tag exception, the automatic documents of every order in your store wait about 60 seconds (see Trigger delays). Right before the document is created, the order’s tags are read again, so a tag you add right after the order still counts. A tag added after the document was created doesn’t change it.

0-value orders

Orders with a total of 0 get documents unless the Order total is 0 exception is on. New installs start with it on; on earlier stores, add it if you need it. It applies to every automatic document, POS and COD orders too.

Generate for

For the invoice and the proforma, choose who gets it: Everyone (default), Companies or Individuals.

  • A company (B2B) is a customer whose order has a valid VAT ID (cod de TVA). An info banner at the top of the Triggers card says the same. See B2B handling.

  • It only decides whether the document is created. Email sending stays as you set it for each document.

  • When a document isn’t created because of Generate for, the Monitor shows it on the order with a grey Not created badge, the document type and the reason. See Not created on the Monitor.

Triggers by payment method, B2B or B2C

  • B2B / B2C: use Generate for to create a document only for companies or only for individuals.

  • Payment method: you can skip orders paid with a selected payment method (see above). Different triggers per payment method aren’t available.

Set it up

  1. Open SmartBill | Integration app » Settings menu » Triggers section » Skip these orders » Add exception

  2. In Skip orders when, choose the exception (for tags, enter them separated by commas; for payment methods, tick them) » Add exception » Save

  3. For Generate for: choose Everyone, Companies or Individuals under the invoice or the proforma » Save

Good to know

  • By default there’s no exception (new installs: Order total is 0), and every document is for Everyone.

  • Exceptions and Generate for don’t apply to credit notes. A credit note (storno) is created when the order has an invoice from the app, so a skipped order gets one only if you created its invoice by hand.

  • If two documents would be created for the same order at the same moment for overlapping customers (for example When any order is created and When unpaid order is created, both for Everyone), the Triggers card shows a warning. You can still save. The warning isn’t shown on the Start plan.

  • Documents you create by hand ignore these settings.

  • A change only affects new orders. Issued documents don’t change.

✅ Trigger delays

Some triggers wait a little before the document is created. Credit notes never wait.

Trigger delay for COD orders

Only for the When unpaid order is created and When any order is created triggers.

  • Cash on Delivery (COD): the trigger runs after about 30 seconds (about 35 seconds with When unpaid order is created).

  • Any other payment method: the trigger runs right away.

  • COD means Shopify’s built-in Cash on Delivery (COD) payment method. A manual payment method you created with your own name doesn’t count.

Trigger delay for POS orders

For POS orders, the document triggers run after 60 seconds, also when the POS order is paid with COD. Credit note triggers run right away.

Trigger delay with a tag exception

If you have a tag exception, the automatic documents of every order in your store wait about 60 seconds. For COD orders, When unpaid order is created and When any order is created keep their own delay (see above). Only the tags are read again: the rest of the document uses the order data from the moment of the event. See Tags.

✉️ Send documents in email

Tick Email this document to the customer to send the document to the order’s contact email through SmartBill, right after it’s created. You can turn it off anytime.

Automatic emails only work if your own email server is set up in SmartBill. How to set it up

How it works

  • The document is created first, then SmartBill sends the email. These are two separate steps, for manual generation too.

  • If the email isn’t sent, the document is still created and saved. It isn’t created again, so there’s no duplicate.

  • An email is never sent twice for the same document.

  • If you fix a setting later, earlier emails aren’t sent automatically.

  • The Monitor shows under every created document what happened to its email. See Success.

Set it up

Open SmartBill | Integration app » Settings menu » Triggers section » document type » tick Email this document to the customer » Save

By default it’s ticked for the invoice, and not for the proforma and the credit note.

🔗 Linked documents

If the app first creates a proforma and later an invoice for the same order, the two are linked. SmartBill creates the invoice from the proforma, without stock deduction. This works the same for automatic and manual invoices.

Important linking limitation

The app always links to the latest document of the order. So if an order has several documents, the next related one (an invoice or a credit note) is linked to the latest.

Did this answer your question?