FlowAP Template
The FlowAP template defines the templates used for different parts of the inbound transactions to ensure clear communication between the vendor who sends the invoice (scanning service, electronic invoicing service) and the buyer who receives the invoice (NetSuite).
The FlowAP template only supports inbound invoices. These are AP posting transactions in NetSuite, the vendor bill, and vendor bill credit.
The FlowAP template is a custom record in NetSuite where you can define the name of the FlowAP template and the template contents.
The FlowAP template uses JSON as the data interchange format. JSON defines the value pairs and arrays between the XML UBL 2.1 file and NetSuite fields.
Field name | Description |
Primary Information | |
Name | Enter a name for your FlowAP Template. |
Lookup Criteria | |
Vendor Lookup Criteria | JSON objects that would be used as criteria for searching the Vendor for the FlowAP Document. You can enter a maximum of 15 criteria and a minimum of 1. |
Item Lookup Criteria | JSON objects that would be used as criteria for searching the Item for the FlowAP Document. You can enter a maximum of 5 criteria and a minimum of 1. |
Mapping Templates | |
Transaction Mapping | JSON object which defines the mapping for the Transaction Header and Lines. |
Vendor Mapping | JSON object which defines the mapping for the new vendor creation. |
Navigating to the setup
Navigate to FlowAP > FlowAP Configuration > Staria FlowAP Template
This is the list of available FlowAP templates. 3 default templates come with FlowAP upon installation.
You must not edit the Default FlowAP Templates.
Any changes made to the default template will be overridden during new version releases of FlowAP.
To use a customized version of the FlowAP template, save a copy of the Default FlowAP Template.
Apply your own lookup criteria and XML mapping to the new FlowAP Template; and assign it to the relevant Staria FlowAP Subsidiary Setup.
Assigning FlowAP Templates to the FlowAP Subsidiary setup
Navigate to FlowAP > FlowAP Configuration > Staria FlowAP Subsidiary Setup.
Select the subsidiary setup and click edit.
Navigate to the Conversion subtab and find the FlowAP template field.
Select the FlowAP Template.
Click Save.
Lookup Criteria
Transaction Mapping
FlowAP template notation
The FlowAP template is based on JSON syntax. The mapping templates are written inside curly braces.
General Mapping Notation
This mapping notation is used for the majority of the transaction fields. This maps one (1) NetSuite field to (1) XML element.
Example:
{ "nsfieldid1": {"xpath": ["/cac:parentxmlelement/cbc:childxmlelement1"]}, "nsfieldid2": {"xpath": ["/cac:parentxmlelement/cbc:childxmlelement2"]} }
Each field mapping contains the name/value pairs. The name/value pairs consist of:
NetSuite field ID - The field ID of the target field of the NetSuite record or transaction
XML element path - The XML element together with its parent element.
Multiple source Mapping Notation
The general field mapping notation can be modified to map one (1) Netsuite field to multiple XML elements. If the first mapped XML element is empty, the succeeding mapping will be used.
Example:
"taxpercent": {"xpath" : ["./cac:Item/cac:ClassifiedTaxCategory/cbc:Percent", "/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent"]}}]},
In this example, the taxpercent field is mapped to the line-level tax percent and the transaction header-level tax percent.
If the line level tax percent is empty in the XML, the transaction header level tax percent will be used instead.
Complex-type Mapping Notation
Complex-type JSON objects define the mapping for a NetSuite sublist or child record linked to the transaction.
The following complex-type JSON objects are included in the default template:
Transaction Expense/Item Sublist
NetSuite Electronic Bank Payment Vendor Entity Bank Details
Allowance Charge
Example:
{ "nssublistname": {"listpath": ["/cac:parentxmlelement","fields" : [{ "nsfieldid1": {"xpath": ["/cac:parentxmlelement/cbc:childxmlelement1"]}, "nsfieldid2": {"xpath": ["/cac:parentxmlelement/cbc:childxmlelement2"]}, }
Fields with Special Validation
"vendorvat": {"xpath": ["/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID[@schemeID=\"VAT\"]"]},
"subsidiaryvat": {"xpath": ["/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID[@schemeID=\"VAT\"]"]},
item
line: QTY
tax percent
Misc
multiple XML element to single NS field
Document sample use cases such as expense line memo field
Fixed empty memo line level field for unidentified items posted as expense, the following value is now set for the memo: <tax percent> | Item ID - Item Name.
Resolved an issue for XML e-documents that refers to transaction header level tax rate instead of line level tax rate.
For Post Single Bill Line - Expense Item, the rate is always set to 0 to cover discount items limitation. The amount is mapped from the XML. 'Transaction Total' added to the memo
Jira issue related to does not allow stand alone vendor and vendor credit - place is a different page!!!
The default item lookup criteria now include the transaction “itemid” as the 3rd lookup criteria in the hierarchy.
FlowAP document is converted using the incorrect currency when the XML currency. This occurs when the XML currency is not the primary currency of the vendor. It is now fixed so that the XML currency is always used.
If the XML currency is not configured in NetSuite (List>Accounting>Currencies) the conversion will result to an error.
If the XML currency is configured in NetSuite, but not found in the vendor’s available currencies, it will be added to the vendor record and conversion will be successful in using the XML currency.
Enhanced converted transaction’s currency lookup hierarchy.
Fixed an issue where a duplicate number error is flagged when using the same document number between a vendor bill and a vendor credit.
Link to article: Expense Item/Account Lookup Hierarchy , https://staria.atlassian.net/wiki/spaces/SIS/pages/1316683781/Hierarchy+Used+by+FlowAP+Conversion+When+Selecting+Tax+Codes+on+Vendor+Bill+Lines#Tax-Code-Hierarchy-for-Bill-Items
Fixed an issue where vendor creation fails if the XML does not contain or has an invalid payment term.
Fixed an issue where the text “STA_EMPTY” appears on the expense line memo. - Explain when STA EMPTY is expected.
FlowAP Document Status will be set to “DUPLICATE REFERENCE NUMBER” instead of FAILED when the reference number for the transaction already exists in NetSuite.
Implemented a hierarchy for sourcing the Default location used for converted transactions.
Enhanced subsidiary and vendor lookup criteria by adding an ‘operator’ parameter. The operator parameter can be set to ‘contains' or 'is’.
Added transaction billing country default in data parsing. If the XML’s billing country is empty, the vendor’s billing country will be used.
The following tax code lookup options now support 0% tax rates:
Vendor-subsidiary sublist tax code field.
Item tax schedule
Fixed an issue where the final tax code lookup hierarchy entry is using a Default tax code for the vendor’s billing country instead of the transaction’s subsidiary country.
A fix is implemented for a bug affecting setup for subsidiaries setup where WHEN PO# NOT FOUND = Report Error. Subsidiaries with this setup were preventing stand-alone bills from being converted.
Expected errors
If multiple or no vendors are found then an audit trail will be created instead of getting an unexpected error.
Limitations
The FlowAP conversion only supports UBL 2.1 Invoice XML schema. The UBL 2.1 (Universal Business Language) standard provides a set of predefined codes for the
InvoiceTypeCode
element, which specifies the type of invoice being issued. The following are supportedInvoiceTypeCode
values:380 - Commercial invoice: The most common type of invoice used for general business transactions.
381 - Credit note: Used to correct or cancel a previously issued invoice.