Winter'26 Edition: The Era of Zero | Sign up for the Webinar

Creating export templates with the Implementation AI Agent

Prev Next

If Payhawk isn't connected directly to your accounting system, you export your expenses from Payhawk and bring them into your ERP system with a file. To get this file in the format and structure your ERP system requires, you can ask the Implementation AI Agent to build an export template for it, directly in the chat, from a sample file that follows your ERP system's import requirements. You then use the template each time you export your data from Payhawk and import it into your ERP system.

Specifics

  • Export templates can be created by Payhawk Administrators at your company.

  • The Implementation AI Agent can't change an existing template.

  • The AI Agent builds templates with one sheet, where each expense, line item, or payment is one row. If your file has several sheets with the same columns, it builds one sheet from them.

  • The AI Agent doesn't build templates from screenshots or from a description in words. It also doesn't build templates with several different sheets, or journals, where one expense becomes several rows, such as separate VAT and supplier rows. For these, you can build the template yourself from Settings > Exports. For more information, see the article on configuring rows, columns, and cells in files and sheets.

Before you start

To build the export template, you need a sample file that meets your ERP system's import requirements:

  • It needs to be a CSV or Excel file in the format your accounting system imports, for example, its import template or a file you imported before.

  • If you can, add a few real rows to the file. Their values help the AI Agent match each column to the right Payhawk value.

  • The file can be the import template exactly as your accounting system provides it, with title rows above the column names or a row that describes each column. The AI Agent finds the row with the column names and uses the descriptions as guidance, not as values.

Creating the export template

  1. In the Payhawk Web Portal, open AI Office, attach your example file and ask the Implementation AI Agent for an export template, for example, "Build an export template from this file".

    If you ask without a file, the AI Agent asks how you'd like to start. Click on Send an example file and attach the file.

    Chat in AI Office with an example CSV file attached and a request to the Implementation Agent to build an export template from it.

  2. The AI Agent reads the file and matches each column to a Payhawk value. It checks the column's values against your account's data, such as your account codes, tax rates, custom field values, and employees' IDs.

    Then, it:

    1. Finds what one row stands for: an expense, a line item, or a payment. On rows per line item or per payment, each row exports that line item's or payment's own values.

    2. Fills in a column whose rows all have the same value with that value, unless the column is named after a Payhawk value.

    3. Builds columns that join several values, such as the supplier name and the document number, with any fixed text between them, and columns that hold only part of a value.

    4. Takes the file format (CSV or Excel), the date format, the decimal separator, and the number of decimals from the example file.

    5. Uses the template's settings from the example where it shows them, such as which expenses it includes and the date the period is based on. Where the example file doesn't show a setting, it keeps the default.

  3. Answer the AI Agent's questions, if any. It decides what it can and asks only when it can't, for example, when no Payhawk value fits a column whose values vary, when it can't tell what one row stands for, or before it leaves out a column your accounting system requires.

    It asks all its questions in one form. Go through them and click on Confirm.

    Implementation AI Agent's question form in AI Office, asking what the Department Code column should export, with the Confirm button.

    Where two Payhawk values look alike, the AI Agent tells you how they differ. For a column that no Payhawk value fits, you can do either of the following:

    • Leave it empty. This isn't offered for a column your accounting system requires.

    • Create a new custom field named after the column. You can also ask for one in your own words. The AI Agent creates the field only after you confirm, and maps the column to it. Expenses created before the field have no value in it.

  4. Check the preview. The AI Agent shows a table of the template's columns and the Payhawk value of each one. Its reply lists the template's settings, such as the file format, the file name, the date format and decimals, which expenses it includes, and the date the period is based on. It also lists what it assumed, so that you can change it.

    Implementation AI Agent's summary of the export template's settings, followed by a table of the template's columns and the Payhawk value of each one.

    • To see the file itself, click on Download preview. The file downloads in the Payhawk Web Portal, filled with your own expenses. You can import it into your accounting system to check it.

    • To change something, click on Something's different and tell the AI Agent what to change. You'll get a new preview.

  5. Click on Create template. The AI Agent creates and publishes the template.

    Preview of the export template with example values and the Create template and Something's different buttons, followed by the AI Agent's message that the template is created.

The template is listed in Settings > Exports with the "Created by the Implementation Agent" description, and your Payhawk Accountants can use it in the Export app.

Templates tab in Settings > Exports with the new template listed under Active and the Created by the Implementation Agent description.

While you work on a template, it's saved in Settings > Exports as a draft in the Archived list, which every new preview updates. The draft isn't used for exports until you click on Create template. If you no longer want the template, tell the AI Agent, and it deletes the draft.

Templates tab in Settings > Exports with the template draft from the Implementation Agent listed under Archived.

Updating the template

The Implementation AI Agent can't change a template once it's created. To modify it, open the template in Settings > Exports and edit it in the template builder, as with any other template.

Useful resources