Configuration of Project and Contract for org. units through AutoInvoice

How to configure and use organisational units as "Contract" and "Project" references in PEPPOL BIS documents.

This guide concerns configuration and use for all the PEPPOL BIS documents that have "Contract" and "Project" references. For information only related to invoice, see Default mapping requiring configuration in Extended information on mapping for Visma.net AutoInvoice. Note that "Project" is only in use for invoices.
Prerequisites:
  • A running integration with Visma.net AutoInvoice

Configuration of Contract and Project for sending and receiving through Visma.net AutoInvoice

Contract and project references are taken from org. units, and to define which org. unit to use for which reference, the following fields are available in Company data:
  • AutoInvoice project unit
  • AutoInvoice contract unit
  • AutoInvoice customer contract unit
Double click on the field and a list of the 12 org. unit classes is shown. When set, the chosen org. unit will be used when sending an XML document or processing incoming documents.

Sending documents with Contract and Project references

Product catalogue
For Product catalogue, only contract is included, which is placed in cac:ReferencedContract. The way the document logic has been set up, the contract referenced is the customer's, while it is the supplier that sends the product catalogue. For this reason, both AutoInvoice customer contract unit and AutoInvoice contract unit are available to use when sending Product catalogue. When a Product catalogue is sent, Visma Business will look in the Associate table for the relevant org. unit field, and if found, will lookup the name of the chosen org. unit. This value is then added to the XML file.
When Visma Business decides which org. unit to use for Product catalogue, it has this priority:
  1. AutoInvoice customer contract unit
  2. AutoInvoice contract unit
So if the first option is not set, it looks for content in the second option. If neither is set, cac:ReferencedContract will not be included in the Product catalogue XML.
Order
For Order, only contract is included, which is placed in cac:Contract. The way the document logic has been set up, the contract referenced is the customer's, which is also the party that sends the Order. For this reason, only AutoInvoice contract unit is used when sending Order. When an Order is sent, Visma Business will look in the Order document table for the relevant org. unit field, and if found, will lookup the name of the chosen org. unit. This value is then added to the XML file.
Invoice
Invoice includes both contract and project, which are placed in cac:ContractDocumentReference and cac:ProjectReference respectively. As with sending Product catalogue, the supplier is sending, so we use both AutoInvoice customer contract unit and AutoInvoice contract unit as alternatives for cac:ContractDocumentReference in the following priority:
  1. AutoInvoice customer contract unit
  2. AutoInvoice contract unit
So if the first option is not set, it looks for content in the second option. If neither is set, cac:ContractDocumentReference will not be included in the invoice XML.

For cac:ProjectReference, select the org unit value to be used for project in AutoInvoice project unit. If no value is set, cac:ProjectReference will not be included in the invoice XML.

When an invoice is sent, Visma Business will look in the Order document table for the relevant org. unit fields, and if found, will lookup the name of the chosen org. units. These values are then added to the XML file.
Note: If not using order, you also have the alternative to configure Project and Contract in the Visma.net AutoInvoice mapping tool. Note that when using the mapping tool, fields available for Contract are regular reference fields on the order, not org. unit.

Processing incoming documents with Contract reference

Product catalogue
When processing an incoming Product catalogue using Process document, as it is processed on the customer side, only AutoInvoice contract unit is relevant. If not set, nothing will be done with the content of cac:ReferencedContract, if it exists in the Product catalogue XML. If found and the XML has a cac:ReferencedContract, the value in the field will be compared to the content of the org. unit selected in AutoInvoice contract unit. Two criterias must be met to match cac:ReferencedContract with an existing org. unit. These are:
  • Name
  • Sup. no.
The lookup for Name allows for difference in letter case, but is otherwise using exact match. If found, nothing will be done. If not found, a new org. unit will be created, setting org unit no incrementally based on the highest value in the table. Sup. no. will also be added to the new org. unit. The org. unit found or created will not be added to any other table automatically.
Order
When processing an incoming Order using Process document, as it is processed on the supplier side, both AutoInvoice customer contract unit and AutoInvoice contract unit are available to use. They are checked for with this priority:
  1. AutoInvoice customer contract unit
  2. AutoInvoice contract unit
Two criterias must be met to match cac:Contract with an existing org. unit. These are:
  • Name
  • Cust. no.
The lookup for Name allows for difference in letter case, but is otherwise using exact match. If found, the org. unit will be added to the sales order also created when Process document is run. If the org. unit is not found, a new org. unit will be created, setting org unit no incrementally based on the highest value in the table. Cust. no. will also be added to the new org. unit. The new org. unit will be added to the sales order also created when Process document is run.
Invoice
Handling of Contract or Project is not in use when processing incoming invoices.


We would appreciate your feedback. Send feedback on this topic to Visma.