Retrieve and format tax data for bulk upload
Bulk tax filing is supported in some places. Taxpayers need to format their tax data as required and bulk upload the data to SFTP servers of tax authorities. If you need to perform these tasks repeatedly, you can create a workflow to automate the process.
In this article, we'll show you how to build such a workflow based on a template.
Invoicing > Invoice to XML Document - XSLT Transform
This workflow consists of seven tasks.
- Export: Retrieves the Account, Invoice, and BillToContact data for invoices that are in the scope of the tax filing.
- Iterate: Iterates unique invoices.
- Query: For each unique invoice, retrieves the InvoiceItem data that is required by tax authorities.
- Query: For each unique invoice, retrieves the TaxationItem data that is required by tax authorities.
- JSON transform: Transforms the JSON data for an invoice into XML.
- XML transform: Transforms the XML file based on the XML schema definition from tax authorities.
- SFTP upload: Uploads the XML files to the SFTP server of tax authorities. This task is not included in the template. You need to add the task to the template.
- In the export task, you need to specify the conditions to determine the invoices that you want to include in this tax filling process. For example, you can retrieve data for invoices that use the same tax rate (products shipping to the same state or country) for the last month. You also need to select the data fields that you want to include in the final XML file.
- In the two query tasks, you need to select the data fields that you want to include in the final XML file.
- In the XML transform task, you need to select the XML Transform mode and configure the XSLT code and optionally the XSD template.
- In the SFTP upload task, you need to specify the host information and the credentials.
If tax authorities require encryption for the files to be bulk uploaded, you can either download and encrypt the output XML files separately, or call APIs to encrypt the files.