Skip to content

Best Practice: Basware Setup

When operating certain markets, your business may require to distribute electronic invoices – structured invoice data that is exchanged electronically between trading partners in order to automate accounts payable processing.

Be aware that there are various e-invoice formats, distribution channels, and operators. To help getting a wide reach, JustOn Billing & Invoice Management integrates with the Basware Network. This global e-invoicing network supports many protocols and document formats, and interoperates with a large number of partner networks.

Once set up,

  • JustOn sends the invoice data as well as relevant file attachments, like the invoice PDF, to the Basware Network, and
  • Basware generates legally valid electronic invoices and transfers them to the recipients – either directly or via partner networks.

basware
Distributing invoices through Basware

Setting up the invoice distribution with Basware involves a number of configuration tasks, such as adding Basware-specific fields to the Invoice object and the Business Entity custom setting. For the complete setup description, see Setting Up Invoice Distribution With Basware. The common instructions include the minimum required fields. Depending on your business context (type of products or services sold, target markets, etc.), Basware may, however, require additional fields to be set, and produces errors if they are missing.

Note

This article gives generally acknowledged and project-approved recommendations for setting up the Basware-specific fields.

The appropriate configuration may always vary depending on your individual business requirements.

Basware Fields on Account

API Name Data Type Notes
ON_BaswareRecipientId Text The identifier of the recipient, typically a string or a number derived from a registry number. Can be, for example, a VAT number, an IBAN or an email address.
The specified value will be copied to the BaswareRecipientId field of the produced invoice.
ON_BaswareSchemeId Picklist The type of the identifier, for example, VAT or IBAN.
The specified value will be copied to the BaswareRecipientId field of the produced invoice.

Basware Fields on Invoice

API Name Data Type Notes
BaswareRecipientId Text The identifier of the recipient, typically a string or a number derived from a registry number. Can be, for example, a VAT number, an IBAN or an email address.
BaswareSchemeId Picklist The type of the identifier, for example, VAT or IBAN.
Create picklist values for all eligible endpoint scheme IDs.
If the scheme ID is not known, the identifier must be a globally unique value.
BaswareMapping Formula (Text) Additional data definition as a valid JSON configuration.
See Sending Additional Information to Basware.
BaswareOrderReferenceId Formula (Text) Order number reference on the business document, identifies the referenced order assigned by the buyer.
See data.
ON_KID_Document__c
BaswarePartyIdentificationId Formula (Text) Party that is the accountable buyer of the goods/services in the referred business document.
See accountingCustomerParty.
ONB2__Account__r.ON_TaxNumber__c
BaswarePartyIdentificationSchemeId Formula (Text) External global identifier of the id identifier element.
See accountingCustomerParty.
VAT
BaswarePartyTaxCompanyId Formula (Text) A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority.
See accountingCustomerParty.
ONB2__Account__r.ON_TaxNumber__c
BaswarePaymentIdentifierId Formula (Text) An identifier for a payment made using this means of payment.
See paymentMeans.
ON_KID_Document__c

Basware Fields on Invoice Line Item

API Name Data Type Notes
BaswareMapping Long Text
Formula (Text)
Additional data definition as a valid JSON configuration.
See Sending Additional Information to Basware.

To transfer, for example, discount information – on the condition that it exists – from the invoice line item to Basware, you can use the following formula in BaswareMapping on the invoice line item:

'[' +
IF( ONB2__DiscountAmount__c < 0,
'{"path":["allowanceCharges","[0]","chargeIndicator"],"fragment":false},' +
'{"path":["allowanceCharges","[0]","amount"],"fragment":' & TEXT (ABS(ONB2__DiscountAmount__c)) & '},' +
'{"path":["allowanceCharges","[0]","multiplierFactorNumeric"],"fragment":0' & TEXT ( ONB2__Discount__c ) & '}'
,''
) +
']'

Now if there is a discount amount, this formula produces a JSON mapping that sets the relevant fields in the allowanceCharges data structure, which Basware uses to hold discount information:

  • chargeIndicator = false marks a discount
  • amount holds the absolute value of the discount amount
  • multiplierFactorNumeric specifies the discount rate

Basware Fields on Business Entity

API Name Data Type Notes
BaswareRecipientId Text (255) The identifier of the supplier, typically a string or a number derived from a registry number. Can be, for example, a VAT number, an IBAN or an email address.
BaswareSchemeId Text (255) An eligible endpoint scheme ID for the current business entity, representing the type of the identifier, for example, VAT or IBAN.
If the scheme ID is not known, the identifier must be a globally unique value.
BaswareMappingId Text(18) The ID of a Salesforce file (ContentDocument) that contains the additional data definition as a valid JSON configuration.
See Sending Additional Information to Basware.
BaswarePartyLegalRegistrationName Text (255) Registration name of the legal entity.
See accountingSupplierParty.
BaswarePartyTaxCompanyId Text (255) A tax identifier for a company. The identifier assigned for tax purposes to a party by the taxation authority.
See accountingSupplierParty.
BaswarePartyTaxCompanySchemeId Text (255) Country-specific agency schema, like DK:CVR for Denmark.
See accountingSupplierParty.
BaswarePartyLegalCompanyId Text (255) A party legal entity identifier, can be the tax identifier (BaswarePartyTaxCompanyId).
See accountingSupplierParty.
BaswarePartyLegalCompanySchemeId Text (255) Identifies the namespace of the legal entity identifier, like VAT when using the tax identifier, for example.
See accountingSupplierParty.
BaswarePartyIdentificationId Text (255) The external system identifier of the party, can be the tax identifier (BaswarePartyTaxCompanyId).
See accountingSupplierParty.

Basware Fields on Basware Status

API Name Data Type Notes
PostDocumentRequestBody Long Text Area (32768) Field used to record the data that is sent to Basware.
See Basware Status.