INFlow determines whether account is One World and Non-One World. If it’s the latter, all subsidiary parameters are ignored.
Vendor
Vendor Field | Field Value Taken From |
{expenseaccount} | [STA] EFlow preferences → {custrecord_sta_einv_pref_vendorexpacc} |
{companyname} | Invoice|AccountingSupplierParty|Party|PartyName|Name à InvoicerName1 |
{currency} | Invoice|DocumentCurrencyCode à CurrencyUnit |
{vatregno} | Invoice|AccountingSupplierParty|Party|PartyIdentification>VAT|ID à InvoicerVATNumber |
{terms} Keep it blank if there are no matching payment terms in NetSuite list | Invoice|PaymentTerms|Note à TermsOfPaymentFreeText
|
{custentity_sta_einv_businessid}
| Invoice|AccountingSupplierParty|Party|PartyIdentification|ID à InvoicerTIN |
{custentity_sta_einv_networkid}
| Invoice|AccountingSupplierParty|Party|EndpointID SenderPeppolIdentifier |
{custrecord_psg_ei_inbound_vendor} | If this value is blank upon creating the bill, set the default E-document package value to REST – Staria Integration on the Vendor record. |
|
|
custentity_edoc_ws_id
| Vendor Web-Service ID – VAT ID or Business ID |
custentity_edoc_ws_sender
| Set the employee which is assigned |
Vendor Address fields | |
Default Billing | Yes (hardcoded) |
Label | Billing (hardcoded) |
{addr1} | Invoice|AccountingSupplierParty|Party|PostalAddress|StreetName à InvoicerLocalAddress1
|
{addr2} | Invoice|AccountingSupplierParty|Party|PostalAddress|AdditionalStreetName à InvoicerLocalAddress2 |
{city} | Invoice|AccountingSupplierParty|Party|PostalAddress|CityName à InvoicerPostOffice |
{zip} | Invoice|AccountingSupplierParty|Party|PostalAddress|PostalZone à InvoicerPostalCode |
{state} | Invoice|AccountingSupplierParty|Party|PostalAddress|CountrySubentity à InvoicerCountryArea |
{country} | Invoice|AccountingSupplierParty|Party|PostalAddress|Country|IdentificationCode à InvoicerCountry |
Vendor Contact fields | |
{entityid} | Invoice|AccountingSupplierParty|Party|Contact|Name à InvoicerContactPersonName |
{phone} | Invoice|AccountingSupplierParty|Party|Contact|Telephone à InvoicerContactPersonTelephoneNumber |
{email} | Invoice|AccountingSupplierParty|Party|Contact|ElectronicMail à InvoicerContactPersonEmailAddress |
Bank Payment Details fields | Create a new record Entity Bank Details {customrecord_2663_entity_bank_details}. NOTE:
NOTE:
|
For the below set of fields coming from UBL message:
| If PaymentChannelCode = BBAN, as per example below:
<cac:PaymentMeans> <cbc:PaymentMeansCode>31</cbc:PaymentMeansCode> <cbc:PaymentDueDate>2013-07-20</cbc:PaymentDueDate> <cbc:PaymentChannelCode>BBAN</cbc:PaymentChannelCode> <cbc:PaymentID>0003434323213231</cbc:PaymentID> <cac:PayeeFinancialAccount> <cbc:ID>011117947</cbc:ID> <cac:FinancialInstitutionBranch> <cac:FinancialInstitution> <cbc:ID>DNBANOKK</cbc:ID> </cac:FinancialInstitution> </cac:FinancialInstitutionBranch> </cac:PayeeFinancialAccount> </cac:PaymentMeans>
Then domestic payment template has to be fetched, as listed below |
{name} | [Subsidiary VAT ID] [BBAN] |
{custrecord_2663_entity_bank_type} | Primary (ID=1) |
{custpage_2663_entity_file_format} | [STA] INFlow preferences → {custrecord_sta_einv_pref_paymdom} |
{custrecord_2663_entity_bban}
| Invoice|PaymentMeans|PayeeFinancialAccount|ID à LocalAccountNumber |
{custrecord_2663_entity_bic}
| Invoice|PaymentMeans|PayeeFinancialAccount|FinancialInstitutionBranch|FinancialInstitution|ID|@schemeURI à SWIFTCode |
For the below set of fields coming from UBL message:
| If PaymentChannelCode = IBAN, as per example below:
<cac:PaymentMeans> <cbc:PaymentMeansCode>31</cbc:PaymentMeansCode> <cbc:PaymentDueDate>2013-07-20</cbc:PaymentDueDate> <cbc:PaymentChannelCode>IBAN</cbc:PaymentChannelCode> <cbc:PaymentID>0003434323213231</cbc:PaymentID> <cac:PayeeFinancialAccount> <cbc:ID>NO098011117947</cbc:ID> <cac:FinancialInstitutionBranch> <cac:FinancialInstitution> <cbc:ID>DNBANOKK</cbc:ID> </cac:FinancialInstitution> </cac:FinancialInstitutionBranch> </cac:PayeeFinancialAccount> </cac:PaymentMeans>
Then foreign payment template has to be fetched, as listed below |
{name} | [Subsidiary VAT ID] [IBAN] |
{custrecord_2663_entity_bank_type} | Primary (ID=1) |
{custpage_2663_entity_file_format} | [STA] eFlow preferences → {custrecord_sta_einv_pref_paymfor} |
{custrecord_2663_entity_iban} | Invoice|PaymentMeans|PayeeFinancialAccount|ID à IBANAccountNumber |
{custrecord_2663_customer_code} | When subsidiary’s country is DK, and the Vendor’s country is DK, then PaymentID should consist of the following characters: <cac:PaymentMeans> <cbc:PaymentMeansCode/> <cbc:PaymentDueDate>2019-01-29</cbc:PaymentDueDate> <cbc:PaymentChannelCode>IBAN</cbc:PaymentChannelCode> <cbc:PaymentID>+71<000000001590108+87700836<</cbc:PaymentID>
+71<000000030341903+83473657< Take the value between + and < signs (last numeric part) and set it in the {custrecord_2663_customer_code} field, on the same Entity Bank Details record created for IBAN/BBAN |
{custrecord_2663_entity_bic}
| Invoice|PaymentMeans|PayeeFinancialAccount|FinancialInstitutionBranch|FinancialInstitution|ID à SWIFTCode |
Transaction
Vendor Bill Field | Field Value Taken From |
{subsidiary} | Subsidiary is taken from the Vendor record. Vendor is determined based on the reference and subsidiary.
Reference:
<cac:AccountingSupplierParty> <cac:Party> <cac:PartyIdentification> <cbc:ID>32322654</cbc:ID> And match it against:
Subsidiary: There could be multiple subsidiaries added to the Vendor if Shared Vendor feature is used. Determine Vendor’s subsidiary based on the following parameters:
<cac:AccountingCustomerParty> <cac:Party> <cbc:EndpointID>9908:913514874</cbc:EndpointID <cac:PartyIdentification> <cbc:ID schemeID="GLN">3456789012098</cbc:ID> </cac:PartyIdentification> <cac:PartyIdentification> <cbc:ID schemeID="VAT">NO913514874MVA</cbc:ID> </cac:PartyIdentification>
Sometimes the EDI value is placed in the following tag:
<cac:AccountingCustomerParty> <cac:Party> <cac:PartyIdentification> <cbc:ID schemeID="ISO6523">003725645307</cbc:ID> </cac:PartyIdentification>
Which is checked by script in addition to <cbc:EndpointID>9908:913514874</cbc:EndpointID |
{tranid} | Invoice|ID → MessageInvoiceNumber |
{custbody_sta_nord_trandate} → Document Date | Invoice|IssueDate → MessageDate |
{trandate} | Current Date |
{custbody_sta_origpostingdate} | The same as {trandate} |
{memo} | Invoice|Note → MessageAdditionalInfo1 |
{currency} | Invoice|DocumentCurrencyCode → CurrencyUnit
If currency is not valid, e.g. <cbc:DocumentCurrencyCode>NIL</cbc:DocumentCurrencyCode>, then source the currency from the Vendor record. If the required currency is not a part of the Vendor record, add the currency first to the sublist of the Vendor record |
{entity} | Invoice|OrderReference|CustomerReference → Identified through this field |
{duedate} | Invoice|PaymentMeans|PaymentDueDate → DueDate |
{exchangerate} | Invoice|TaxExchangeRate|CalculationRate → ExchangeRate |
{custbody_sta_eflow_ourref} | Look for a contact record for the respective Vendor, using the below entity ID: <cac:AccountingSupplierParty> <cac:Party> <cac:Contact> <cbc:ID>Our ref.</cbc:ID> <cbc:Name>Antonio Salemacher</cbc:Name> (Invoice|AccountingSupplierParty|Party|Contact|Name) <cbc:Telephone>46211230</cbc:Telephone> (Invoice|AccountingSupplierParty|Party|Contact|Telephone) <cbc:ElectronicMail>antonio@salescompany.no</cbc:ElectronicMail> (Invoice|AccountingSupplierParty|Party|Contact|ElectronicMail) </cac:Contact>
If Contact exists, set it in Our Reference field. If contact does not exist, create a new contact with the following values: entityid = <cbc:Name>xxx</cbc:Name> → the only mandatory value phone = <cbc:Telephone>46211230</cbc:Telephone> email = <cbc:ElectronicMail>yyy@xxx.zz</cbc:ElectronicMail>
Then, set the contact in Our Reference field |
{custbody_sta_eflow_yourref} | Look for an employee record with the below email address:
<cac:AccountingCustomerParty> <cac:Party> <cac:Contact> <cbc:ID>3150bdn</cbc:ID> <cbc:Name>John Doe</cbc:Name> <cbc:Telephone>5121230</cbc:Telephone> <cbc:ElectronicMail>john@buyercompany.no</cbc:ElectronicMail>
If there is no employee found as per above email, then Your Reference field is not populated. |
{custbody_2663_reference_num} | Invoice|PaymentMeans|PaymentID
<cac:PaymentMeans> <cbc:PaymentMeansCode>31</cbc:PaymentMeansCode> <cbc:PaymentDueDate>2019-01-27</cbc:PaymentDueDate> <cbc:PaymentChannelCode>BBAN</cbc:PaymentChannelCode> <cbc:PaymentID>10063101298</cbc:PaymentID>
When subsidiary’s country is DK, and the Vendor’s country is DK, then PaymentID should consist of the following characters: <cac:PaymentMeans> <cbc:PaymentMeansCode/> <cbc:PaymentDueDate>2019-01-29</cbc:PaymentDueDate> <cbc:PaymentChannelCode>IBAN</cbc:PaymentChannelCode> <cbc:PaymentID>+71<000000001590108+87700836<</cbc:PaymentID>
+71<000000030341903+83473657< Take the value between < and + signs (middle numeric part) and set it in {custbody_2663_reference_num} |
{custbody_sta_inflow_entitybankdetails} | Set the related Entity Bank Details record:
|
Item Line Fields | |
{Item} | Look for Vendor’s item code in the system to set the item/Items: <cac:Item> <cbc:Description>Processor: Intel Core 2 Duo SU9400 LV (1.4GHz). RAM: 3MB. Screen 1440x900</cbc:Description> <cbc:Name>Laptop computer</cbc:Name> <cac:SellersItemIdentification> <cbc:ID>JB007</cbc:ID> </cac:SellersItemIdentification> <cac:StandardItemIdentification> <cbc:ID schemeID="GTIN">1234567890124</cbc:ID> </cac:StandardItemIdentification> <cac:OriginCountry> <cbc:IdentificationCode>DE</cbc:IdentificationCode> </cac:OriginCountry> <cac:CommodityClassification> <cbc:ItemClassificationCode>12344321</cbc:ItemClassificationCode>
Linked Bills: To match the items between Bill and IR/PO, <cac:SellersItemIdentification> value is used:
NOTE: Direct Bills may not have item codes. It could also be so that there is just a description (free text in Invoice Line tag). In this case, the line has to be posted as expense line, using {account} posting spec one row below. <cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:Note>Freetext note</cbc:Note> <cbc:InvoicedQuantity unitCode="NAR">1.0</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="NOK">1272.0</cbc:LineExtensionAmount> <cbc:AccountingCost>BookingCode001</cbc:AccountingCost> <cac:OrderLineReference> <cbc:LineID>1</cbc:LineID> Mapping: <cbc:Note>Freetext note</cbc:Note> = Memo <cbc:LineExtensionAmount currencyID="NOK">1272.0</cbc:LineExtensionAmount> = Line Amount
However, some direct bills may still have <cac:SellersItemIdentification> referenced, that mostly likely will not exist in the system. In this case, to avoid too many errored transactions, such lines will be created as expense lines, using the specification above. In case of linked bills, check for the following preference by subsidiary {custrecord_sta_einv_pref_item_expline} – if this is checked, created unidentified (items not found in NetSuite) as expense lines as well. |
{account} | Look up {customrecord_sta_einv_pref} record, filtered by Subsidiary. Check {custrecord_sta_einv_pref_billexpacc} field: · Vendor’s default expense account (ID=1) → Take the value from Vendor record record, {expenseaccount}. o If no value is found, look up the account used on the latest bill created for that vendor. o If there is no Vendor default account set, take the value from {custrecord_sta_einv_pref_expacc} · Based on last posting (ID=2) → look up the account used on the latest bill created for that vendor. o If there is no Bill found, check the default expense account on the Vendor record in {expenseaccount} o If there is no Bill found for that Vendor, take the value from {custrecord_sta_einv_pref_expacc}
If the are no lines captured in XML, then script adds a single line with the following value:
<cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="NOK">1422.32</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmount currencyID="NOK">1422.32</cbc:TaxExclusiveAmount> <cbc:PayableRoundingAmount currencyID="">0.1</cbc:PayableRoundingAmount> <cbc:PayableAmount currencyID="NOK">1778.0</cbc:PayableAmount> </cac:LegalMonetaryTotal> NOTE: If INFlow Preferences for the respective subsidiary has a check-box “Use Items on Vendors/Stand-Alone Bills” {custrecord_sta_einv_pref_useitems} checked, then bill lines will be posted as items. Default Item {custentity_sta_inflow_defitem} on Vendor record will be used instead of a default Vendor expense account.
If there is no Vendor Default Item identified, then use default value from INflow Preferences – ”Default Vendor Expense Item” {custrecord_sta_einv_pref_vendorexpitem}. In case there is no bill created for a vendor yet (no last posting) or in case there is no default vendor expense item defined, then script uses Default Expense Item in INFlow Preferences {custrecord_sta_einv_pref_defitem}. ”Post unidentified Items as default items on linked Bills” {custrecord_sta_einv_pref_defitemposting} – if this checkbox is checked, then items, not identified on the Bill, will be posted as default items fetched from the Vendor record/INFlow Preferences. |
Tax Code | Look for the percent as defined in (for every item) Invoice|InvoiceLine|Item|ClassifiedTaxCategory|Percent
3. If the vendor specific code is not defined, follow b and c from above (same scenarios as if the percentages do not match).
If the line tax value is blank → Invoice|InvoiceLine|Item|ClassifiedTaxCategory|Percent, then look up the percentage in the following tag: <cac:TaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>25.0</cbc:Percent> <cac:TaxScheme/> </cac:TaxCategory> |
{amount} | Line item amount/rate is taken from the following tag:
<cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:InvoicedQuantity>1.0</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="DKK">54166.67</cbc:LineExtensionAmount> <cac:Item> <cbc:Name>Husleje</cbc:Name> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="DKK">54166.67</cbc:PriceAmount> </cac:Price> </cac:InvoiceLine>
If it is zero, then the value is taken from <cbc:PriceAmount currencyID="DKK">54166.67</cbc:PriceAmount> If PriceAmount is zero, then value is taken from the AdditonalItemProperty element: <cac:InvoiceLine> <cbc:ID>2</cbc:ID> <cbc:InvoicedQuantity>1.0</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="NOK">0.0</cbc:LineExtensionAmount> <cac:Item> <cbc:Name>Kantineservice, Sekkebekksletta 8, LILLESAND. 1.Februar. 2019 -</cbc:Name> <cac:SellersItemIdentification> <cbc:ID>954595-2</cbc:ID> </cac:SellersItemIdentification> <cac:AdditionalItemProperty> <cbc:Name>LineTotalIncludingTax</cbc:Name> <cbc:Value>14752.82</cbc:Value> </cac:AdditionalItemProperty> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="NOK">14752.82</cbc:PriceAmount> </cac:Price> </cac:InvoiceLine>
In case of <cbc:InvoiceTypeCode>381</cbc:InvoiceTypeCode>, treat the amount value as absolute value (so it is never negative) |
{memo} | Invoice|InvoiceLine|Note → AdditionalLineInformation |
{custcol_so_deliverydate} | Invoice|InvoiceLine|Delivery|ActualDeliveryDate → DateOfDelivery |
Rounding | <cac:LegalMonetaryTotal> <cbc:LineExtensionAmountcurrencyID="NOK">1019.1</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmountcurrencyID="NOK">1019.1</cbc:TaxExclusiveAmount> <cbc:PayableRoundingAmountcurrencyID="">-0.01</cbc:PayableRoundingAmount> → put this value against the account found in corresponding INFlow Preferences record, {custrecord_sta_einv_pref_roundingacc} field, with the defined plus/minus sign <cbc:PayableAmount currencyID="NOK">1169.58</cbc:PayableAmount> </cac:LegalMonetaryTotal> |
Allowance charges | <cac:AllowanceCharge> <cbc:ChargeIndicator>true</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>Postage fee</cbc:AllowanceChargeReason> → Memo field <cbc:Amount currencyID="NOK">89.0</cbc:Amount> → Line amount, put this value against the account found in corresponding INFlow Preferences record: {custrecord_sta_einv_pref_discountacc}, if value is negative (value should be set with negative sign) or if ChargeIndicator=false {custrecord_sta_einv_pref_chargeacc}, if value is positive or if ChargeIndicator=true
<cac:TaxCategory> <cbc:Percent>25.0</cbc:Percent> → Line tax code <cac:TaxScheme/> </cac:TaxCategory> </cac:AllowanceCharge> |