Configuration
Settings live at Econz → Settings, on six tabs. Each tab saves on its own and leaves the other five alone.
Connection
| Setting | Default | |
|---|---|---|
| App secret token | Identifies your app. Accepts $ENV_VAR. | |
| Agreement grant token | Identifies the company whose books are written. Accepts $ENV_VAR. | |
| Demo mode | Off | Connects to e-conomic's read-only demo agreement. Econz refuses every push while it's on. |
| Timeout | 20 | Seconds before Econz gives up on a call. |
| Retries | 3 | How many times a 429, a 5xx or a dropped connection is retried. |
e-conomic throttles with a token bucket and reports the cost of every call. Econz reads both
headers and slows down before the bucket runs out, so a bulk push doesn't turn into a row of 429s.
Mapping
These decide what an invoice looks like. Invoice layout and payment terms are required by e-conomic. Econz won't push without them.
| Setting | Default | |
|---|---|---|
| Invoice layout | The layout invoices are drawn with. Required. | |
| Payment terms | Used on invoices, and on customers Econz creates. Required. | |
| Customer group | Where new customers are filed. Required to create customers. | |
| Product group | Where new products are filed (Pro catalogue sync). | |
| Default unit | Put on lines that have no unit of their own. | |
| Invoice address | Billing address | Which Commerce address becomes the invoice recipient. |
| Line description | Commerce description | Or the SKU. |
| Line discounts | Fold into the unit price | Or send as a discount percentage. See below. |
| Shipping product number | Blank sends a description-only line. | |
| Shipping line description | Shipping | |
| Discount product number | For order-level discount lines. | |
| Other adjustment product number | For fees, handling, gift wrap and anything else. | |
| Include other adjustments | On | Non-shipping, non-discount adjustments become their own lines. |
| Reference | Order number (short) | What goes in the invoice's other reference: the number, the order reference, the element ID, or nothing. |
| Invoice heading / Invoice note | Accept {number}, {reference}, {email} and {date}. | |
| Tolerance | 0.01 | How far Econz's computed total may drift from Commerce's. |
| When they disagree | Send anyway and warn | Or Refuse to send. |
| Departmental distribution / Project | Pro. Put on every invoice line. |
Line discounts
Fold into the unit price sends each line at the price actually charged. The invoice always reconciles to the øre, and it's the default for that reason.
Send as a discount percentage keeps the full unit price and sends discountPercentage, which reads
better on a printed invoice. e-conomic rounds the percentage itself, so a line can come out one
øre off. The totals check runs either way and names the line when that happens.
Totals reconciliation
Econz never sends a total. e-conomic works totals out from the lines. Before sending, Econz does the same arithmetic e-conomic will do and compares the result with Commerce. If the difference is bigger than the tolerance, Send anyway and warn records a warning on the order and sends anyway. Refuse to send does what it says, with both figures on the order screen.
A shop whose bookkeeper reconciles to the øre should set this to Refuse to send.
VAT
e-conomic doesn't want a tax rate. It wants a VAT zone, and the zone decides whether VAT is charged at all.
| Setting | Default | |
|---|---|---|
| Home country | DK | Addresses here are always Domestic. |
| Domestic zone | 1 | |
| EU zone | 2 | |
| Abroad zone | 3 | |
| EU addresses without a VAT number are still EU | Off | Put EU consumers in the EU zone instead of Domestic. |
| Accept business details from the front end | On | Take CVR, EAN and VAT number from your checkout, for the requester's own cart. |
| CVR / EU VAT number / EAN field handle | Your own order fields, if you already collect these. | |
| Phone field handle | A phone field on the address. Craft addresses have no phone of their own. |
How Econz picks the zone:
- The home country is always Domestic. A Danish buyer is domestic even with a CVR.
- An EU country with a well-formed VAT number is EU, which is what reverse charge needs.
- An EU country without one is Domestic. A sale to an EU consumer normally carries your own VAT, and putting a private buyer in the EU zone would zero-rate the sale without anyone noticing. If you're registered for OSS and handle it differently, turn on EU addresses without a VAT number are still EU.
- Everything else is Abroad.
VAT numbers are checked for format only, never against VIES. VIES goes down now and then, and a checkout shouldn't stop taking money when it does. A malformed number falls back to Domestic, which is the safe direction.
Customers
| Setting | Default | |
|---|---|---|
| Create customers | On | Create a customer in e-conomic when nothing matches. |
| Match existing customers by | Email, then CVR | Or email only, or CVR only. Econz's own link table is always checked first. |
| Update matched customers | Off | Copy the order's address and phone over an existing customer. |
| Fallback customer number | A catch-all debtor ("Diverse") for when nothing matches and creating is off. |
Once a Craft user or an email address is linked to an e-conomic customer, the link wins over any later match. Renaming the customer in e-conomic doesn't break it. Two simultaneous checkouts can't create the same customer twice either, because the link table is unique on both the user and the email.
Sync (Pro)
| Setting | Default | |
|---|---|---|
| Push automatically | Off | Queue a push without anyone pressing a button. |
| Trigger | When the order is completed | Or when it reaches one of the statuses you choose. |
| Minimum order total | 0 | Skip orders below this. Zero-total orders are usually test traffic. |
| Book automatically | Off | Book the draft right after creating it. |
| Send on booking | Don't send | Email, EAN (e-invoicing), or both, handed to e-conomic's own sending. |
| Write order history notes | On | Add a note to the order when a draft is created or booked. |
| Credit on refund | Off | Raise a credit note when a Commerce refund goes through. |
| Create products | Off | Create an e-conomic product for a SKU that has none. |
| Require known products | Off | Refuse an order containing a SKU with no product. |
Automatic pushes are always queued. An order is saved inside the customer's payment request, and a slow accounting system mustn't be able to fail a payment.
Leave Book automatically off until you've checked a few drafts in e-conomic. A booked invoice can't be edited. It can only be credited.
Log
| Setting | Default | |
|---|---|---|
| Log API calls | On | One row per API call, with the status, duration and e-conomic's call cost. |
| Store request and response bodies | Off | Also store request and response bodies. |
| Retention | 30 days | 0 keeps everything. |
Bodies are off by default because an invoice payload contains a named customer, their address and what they bought. Turn them on while you debug something, then turn them off again.
Permissions
| Permission | Lets a user |
|---|---|
| Send orders to e-conomic | Push, re-send and preview |
| Book and credit invoices | Book a draft or raise a credit note |
| Manage customer and product links | Edit or remove links |
| View the connection log | Read the log |