Learn how to map a custom NetSuite field into an outbound e-invoice when the default ZoneCapture XML template does not cover the data you need to send.
Note: Clicking on the images within this guide will enlarge them for better viewing.
Important: This feature is available for Ecosio E-Document stations only. ZoneCapture does not support custom outbound templates for Basware.
Overview
ZoneCapture generates outbound e-invoices from a default XML template for each country. If the default template does not cover data you need to include in the e-invoice, such as a custom NetSuite field, you can supply your own customized template and configure a corresponding send data field mapping.
Some country-specific e-invoicing requirements make this configuration mandatory. For example, French e-invoicing Use Case 1 requires line-level purchase order references that the default template does not cover, so affected customers must complete a custom mapping. For other countries or use cases, this configuration is an optional enhancement, depending on your business needs.
This guide uses French Use Case 1 as a worked example, but the configuration approach applies to any country or e-invoicing scheme where you need to source a custom NetSuite field into the outbound XML.
Important: ZoneCapture does not validate custom templates at upload. If a custom template contains an error, you will only discover it when an e-invoice fails to send. Always test thoroughly in a Sandbox environment before applying changes to Production.
Prerequisites
- Confirm you have access to NetSuite with the ZoneCapture bundle (
299642) installed. - Create the custom field in NetSuite at the relevant level, header or line, containing the data you want to include in the e-invoice.
- Confirm you have access to the ZoneCapture Main Configuration record and the NetSuite File Cabinet.
- Review the e-invoicing XML structure required by the relevant country or scheme.
For this example, a custom field Order Number Custom has been added to the invoice.
Step 1: Customize the source saved search
ZoneCapture uses saved searches to source data for e-invoice mappings. The default saved searches provided in the bundle do not include custom fields, so you must create a copy and add your custom column.
- Navigate to Lists > Search > Saved Searches.
- Locate the default saved search for the relevant data level:
- For line-level data, find the default transaction lines saved search. To identify it quickly, look up an existing line-level mapping (for example, Quantity) and note the saved search it references.
- For header-level data, use the corresponding header saved search.
- Open the saved search and click Edit.
- Update the Search Title to distinguish it from the default (for example, append "Custom" to the name).
- In the Results subtab, add a new column for your custom field:
- Select your custom field from the available columns.
- In the Tag field, enter a unique identifier to reference this column in the mapping (for example,
order_number_line). Note this tag; you will need it in Step 2.
- Click Save As to save it as a new saved search. Do not overwrite the default.
- Note the Internal ID of the new saved search; you will need it in Step 2.
Important: If your custom field is a List/Record type (a Pick-list), do not add the field directly as a column. Instead, use a Formula (Text) column and enter {your_field_internal_id}.name. This ensures the saved search returns the display value of the Pick-list rather than its internal ID.
Step 2: Create a new e-invoice send data mapping
The send data mapping record tells ZoneCapture where to source a value from and where to place it in the outbound XML.
- Navigate to the E-Invoice Send Data Mapping list in ZoneCapture.
- Create a new mapping record with the following fields.
| Field | Value |
|---|---|
| Name | A descriptive name for this mapping (for example, Custom Order Number Line) |
| Field ID | The tag you defined in the saved search column (for example, order_number_line) |
| Send Data Path | The exact XML path required by the relevant country or scheme standard (see note below) |
| Line Type | Line for line-level data, or Header for header-level data |
| Source Data Saved Search | The Internal ID of the saved search you created in Step 1 |
| Country | Optional. Restrict this mapping to a specific country if the custom field should only appear on e-invoices for that country. Leave blank to apply to all countries. |
- Click Save.
Important: The exact Send Data Path depends on the country or scheme requirements. For French Use Case 1 (line-level order reference), the path follows the structure cac:InvoiceLine > cac:OrderLineReference > cbc:LineID. Refer to the relevant country specification, or contact your implementation team, to confirm the correct path for your use case.
Step 3: Customize the XML template
ZoneCapture provides a default XML template for each country in the bundle's File Cabinet folder. You must create a custom version of this template to include the new XML block for your custom field.
3a. Download the default template
- In NetSuite, navigate to the File Cabinet.
- Locate the bundle folder: e-Invoicing Templates > Default Templates.
- Find and download the XML template for the relevant country.
3b. Edit the template
- Open the downloaded XML file and locate the position in the XML structure where you must insert the new data block, as required by the country or scheme specification.
- Add the following logic at the correct position:
The exact XML structure must conform to the requirements of the relevant country or e-invoicing scheme. The example above is based on the French Use Case 1 specification. Adjust the XML path and tag names for other countries or use cases.
Important: If you already use a custom template, do not replace it. Instead, open your existing custom template and insert only the new XML block in the correct position.
3c. Save and upload the template
- Save the edited file with a unique name (for example,
[Country]_EInvoicing_Template_Custom.xml). - Upload the file to a dedicated folder in the File Cabinet, such as a custom templates folder you maintain for your configuration.
Step 4: Update the ZoneCapture main configuration
- Navigate to Setup > ZoneCapture Setup > ZoneCapture Main Configuration.
- Click Edit next to your main configuration.
- Open the E-Documents Subtab.
- Click New ZC E-Document Template.
- Select the relevant country.
- Set the ZC E-Document Template field to the custom XML file you uploaded in Step 3c.
- Click Save.
Step 5: Test the configuration
- Create a test invoice in your Sandbox environment, and populate the custom field with test values. Use different values per line if you are testing line-level mappings.
- Click Send Document to send the document.
- Run the
ZC E-Invoicing Sending MRscript, and once it completes, run theGet Outgoing Notificationscript to retrieve any error responses from the e-invoicing network. - Refresh the invoice, navigate to the Billing Subtab, and open the Sent E-Documents Attempts record, then open the BUMID.
- Review the generated XML file, and verify the following:
- The custom field values appear in the correct XML path.
- Each line contains the expected value, for line-level mappings.
- The e-invoicing network returns no validation errors.
Important: Only move this configuration to Production once your Sandbox test confirms the generated XML is valid and error-free.
Attached resources
Tip: A ready-to-use custom XML template for French Use Case 1 (line-level order reference) is attached to this article. If you are starting from scratch for France, download and use this template, and replace the source field references with your own custom field IDs. If you already use a custom template, copy only the relevant XML block from this file.