Hubhus can send data to e-conomic in three different ways. Which one applies to you depends on how your setup is configured. This article explains all three, helps you identify which one you are using, and covers common issues for each.
Read more
Method 1: JSON structure for df_e_conomic
The df_e_conomic Data Field stores a single JSON object per submission. Minimal required structure:
{ "type": "order",
"customer": { "name": "...", "email": "...", "address": "...", "zip": "...", "city": "..." },
"lines": [
{ "product": { "productNumber": "600" }, "quantity": 1, "unitNetPrice": 1250.00, "description": "..." }
],
"notes": { "heading": "Order ref", "textLine1": "Lead ID" }
}
Key rules: quantity must be positive (zero/negative is rejected). productNumber must exist in your e-conomic account. unitNetPrice is net (excl. VAT).
Deletion flow: To delete an existing draft, set "hubhusEconomicAction": "delete" in the JSON. Your Make scenario must check for this key before attempting to create a new order.
Method 2: Example payload with Hubhus placeholders
{ "type": "order",
"customer": { "name": "%lead_name%", "email": "%lead_email%",
"telephoneAndFaxNumber": "%lead_phone%", "address": "%lead_street_address%",
"zip": "%lead_postal_code%", "city": "%lead_city_name%" },
"lines": [ { "product": { "productNumber": "600" }, "quantity": 1,
"unitNetPrice": 0, "description": "..." } ],
"notes": { "heading": "Order - %lead_name%", "textLine1": "Lead ID: %lead_id%" }
}
Use Method 2 when the invoice content is straightforward and expressible with standard lead fields. Use Method 1 when pricing depends on form inputs or requires multiple dynamic lines.
Method 3: Adding a manual product line (step by step)
- Go to the billing campaign. If the customer exists as a lead, skip to step 5. Otherwise click New order.
- In the modal, click Select existing customer.
- Search for the customer by name. If not found, check Billing → Edit e-conomic customer mappings.
- Select the customer and click Create order. Wait for the order to appear.
- On the customer page, click Add product in the centre panel.
- Search for and select the relevant product (e.g. consultant hours).
- Edit the description: today's date · requester at customer · brief task description · reference. Click the blue checkmark to save.
- Repeat steps 5-7 for each billable item. On the last day of the month, send all draft invoices from e-conomic.
Using the linked e-conomic document in templates and dashboards
When a lead is linked to an e-conomic document, templates and dashboards can read that document with include="economic" on <hh-data.lead>, <hh-data.leads> and <hh-data.leads.first>. The document is placed under the key economic on the lead. This reads data back from e-conomic. It is not a fourth way to send data.
- One field on the current lead:
<hh-data.lead include="economic" get="economic.pdf_url" />. Start the path in get with economic., because get starts at the lead. get="pdf_url" returns nothing.
- Lists and dashboards: loop over
<hh-data.leads> with include="economic" and use e.g. {order.economic.totals.net}. Each lead in the list has its own economic object, so use a loop, an array index, array-filter or pluck instead of a plain get. <hh-data.leads> returns 25 leads by default and at most 500 with limit.
- Totals:
sum="economic.totals.net" adds up the net amounts of the leads in the list without a loop.
- vs. {{eco_*}} placeholders:
{{eco_number}}, {{eco_pdf_url}} and the other {{eco_*}} placeholders work only on the current lead, not per lead in a loop. The delivery address is not in the economic object, so {{eco_delivery_*}} on the current lead is the only way to show it.
- No lines: quote, order and invoice lines are not included, so the data stays small enough for placeholders.
- Customer-facing output: fetch only the fields you need with
get. The full economic object contains financial and customer data, and pdf_url is a signed link that should only go to the customer it belongs to.
<hh-data.lead include="economic" get="economic.number" />
<hh-data.lead include="economic" get="economic.totals.gross" />
<hh-data.lead include="economic" get="economic.debtor.name" />
<hh-for each="order" in='<hh-data.leads campaign="12345" include="economic" />'>
{order.economic.number}: {order.economic.totals.net}
</hh-for>
Total net: <hh-data.leads campaign="12345" include="economic" sum="economic.totals.net" />
Replace 12345 with your campaign ID. Available paths:
| Path | Value |
economic.type | quotation, order or booked-invoice |
economic.number | Document number |
economic.date, .due_date, .delivery_date | Dates in ISO format. delivery_date can be empty. |
economic.currency | Currency code, e.g. DKK or EUR |
economic.vat_included, .sent, .archived | true or false |
economic.reference, .note | Text, can be empty |
economic.pdf_url | Signed link to the PDF |
economic.totals.net, .vat, .gross, .rounding, .margin, .margin_percent | Amounts |
economic.debtor.number, .name, .email, .phone, .address, .postal_code, .city, .ean | The customer (debtor). Email, phone and EAN can be empty. |
economic.employee.number, .name, .email, .phone | The e-conomic employee. Email and phone can be empty. |
Fields can be empty, so check them with @if before you use them. See also HH Components Reference Guide and e-conomic: Invoice campaign best practices.
Common issues
| Symptom |
Likely cause |
| Nothing created in e-conomic | Make scenario not active, filter on wrong field, or df_e_conomic is empty / invalid JSON. |
| Error: product not found | productNumber does not exist in your e-conomic account, or wrong environment (test vs. production). |
| Error: invalid quantity | quantity is 0 or negative, or an empty line was included in lines. |
| Wrong price or VAT amount | unitNetPrice must be net. If the page shows VAT-inclusive prices, divide by the VAT factor in JS before writing. |
| Customer not found (Method 3) | Name differs between Hubhus and e-conomic. Check Billing → Edit e-conomic customer mappings. |
| e-conomic value is empty in a template | include="economic" is missing, the get path does not start with economic., or the lead is not linked to an e-conomic document. |
{{eco_*}} is empty in a lead list | {{eco_*}} placeholders only work on the current lead. Use include="economic" and e.g. {order.economic.totals.net}. |
When reporting an error: Include the raw JSON from df_e_conomic on the affected lead, the lead ID, timestamp, and the full error message from Make or e-conomic.