Business Partner Setup

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Table of Contents#System Administrator's Guide{{#if: Implementation| | Implementation }}{{#if: | | [[{{{3}}}]] }}{{#if: | | [[{{{4}}}]] }}{{#if: | | [[{{{5}}}]] }} | Business Partner Setup{{#if: Product Setup| | Product Setup }} ⇒

Business Partners are one of the critical parts of the ERP system and make up the CRM portion of ADempiere.


A Business Partner is any person or corporation that you do business with. A business partner can be a customer, vendor and/or employee, can have a number of contacts or individuals associated with it and a number of locations. In ADempiere, the Business Partner window provides the Customer, Supplier and Employee resource management functions typically associated with 3rd party contact management applications. Having all the contact information in one place eliminates that need to duplicate data in 3rd party applications.

The basic business partner model in ADempiere orgainizes and categories business partners as follows:

  • Business Partner - a legal entity, typically a corporation but it can also be a single person
  • Business Partner Group - a way to assign a specific price list, discounts and default accounting to a business partner. On reports, the Business Partner Group can also be used to do just that - group Business Partner information. See the {{#if: Business Partner Group|Business Partner Group|BusinessPartnerGroup }} Window. Properly setting up the Business Partner Groups can save lots of time in configuring individual Business Partners following the import.
  • Locations - a Business Partner may have multiple locations. ADempiere requires four types of locations (they can all be the same physical place):
    • Ship address - the location goods are shipped to for a customer or shipped from for a vendor. This can have sales tax implications.
    • Remit-to address - where to send money when paying a vendor
    • Invoice address - the location used to send invoices to a customer or receive invoices from a vendor
    • Pay-From address - the address the Business Partner pays from and where dunning letters will be sent to
For a simple Business Partner, a single location will provide all four location types. For a complex Partners, there may be multiple locations for each type. When creating a document the appropriate location, if there is more than one, can be selected.
  • Contacts - these are individual people associated with the Business Partner. They can also be users of the ADempiere system. If the Business Partner is a person, only one contact is required. The usual contact information can be provided as well as a password for users.

The Setup Workflow

To setup the Business Partners go to Partner Releations{{#if: Business Partner Rules |  » Business Partner Rules }}{{#if: |  »  }}{{#if: |  »  }}{{#if: |  »  }} in the menu tree and open the workflow Icon mWorkFlow.png Business Partner Setup. The following workflow will appear in the workflow tab.




Work your way through the following windows:

  • {{#if: Business Partner Group|Business Partner Group|BusinessPartnerGroup }} Window - The Business Partner Group window allows you to define the accounting parameters, price lists, discounts and other such settings at a group level. If you define the accounting parameters for a group, any Business Partner entered using this group will have these accounting parameters automatically populated. You can then make any modifications necessary at the Business Partner level. Typical groups would be Customers, Suppliers, Employees but you can setup the groups any way you like.
  • {{#if: |{{{2}}}|Greeting }} Window - The Greeting window allows you to define greetings that you will use with business partners and contacts.
  • {{#if: Payment Term|Payment Term|PaymentTerm }} Window - The Payment Terms Window defines the different payment terms that you offer your customers and that are offered to you by your vendors. Each invoice must contain a Payment Term. On the standard invoice, the Name and the Document Note of the Payment Term is printed.
  • {{#if: Invoice Schedule|Invoice Schedule|InvoiceSchedule }} Window - The Invoice Schedule Window defines the frequency and cut off dates for generating summary invoices. If a customer requires a single invoice for multiple shipments you would define the appropriate invoice schedule and associate it with the Customer.
  • {{#if: |{{{2}}}|Dunning }} Window - The Dunning Window defines the parameters that will be used when generating Dunning Letters. Each customer can be associated with a Dunning Code.
  • {{#if: Import Business Partner|Import Business Partner|ImportBusinessPartner }} Window - At this point, you're ready to import business partner data. The Import Business Partner Window is an interim table which is used when importing external data into the system. Selecting the 'Process' button will either add or modify the appropriate records. See Importing Business Partner Data below for more information.
  • {{#if: Business Partner|Business Partner|BusinessPartner }} Window - The Business Partner window allows you do define any party with whom you transact. This includes customers, vendors and employees. Prior to entering or importing products, you must define your vendors. Prior to generating Orders you must define your customers. This window holds all information about your business partner and the values entered will be used to generate all document transactions. After you have performed the import, check and make any correction to the data using this window.

Importing Business Partner Data

Before you attempt to import business partner data, please read the Data Import page.

Example Import

The ADempiere application provides an example business partner import in the ADempiere/data/import folder of the installation. The file is called ExampleBP.csv and if you open it in a spreadsheet program, it will look like this:




There is also a Import File Loader Format in ADempiere with the same name. The fields in the import loader format are defined as shown below:




Note the Start No field - that the value repeats for the first two records. The importer will use the same field in the csv file to fill both the Value and Name fields in the Business Partner table in ADempiere. Also note that the last row in the Format Field tab is set to Constant. This field, the ISO Country Code, does not appear in the csv file but is required. Since it is common for all the csv rows in this example, it can be added as a constant by the import loader and doesn't need to be included in the csv data.

Note.gif Note:

Depending on the version of software, you may get an error saying that the custom separator character must be at least 1 character. To fix this, open the {{#if: Import Loader Format|Import Loader Format|ImportLoaderFormat }} Window and find the Loader Format you are using. Change the Format field to "Custom Separator Char" and define a custom character - it could be a ",". Save the record and then change the Format field back to what you require. Try the import again.

Organizing the Import Data

Have a good look through the tabs and fields in the {{#if: Business Partner|Business Partner|BusinessPartner }} Window and the {{#if: Import Business Partner|Import Business Partner|ImportBusinessPartner }} Window to see what fields are available.

Import as much data as you can. At a minimum, you will need the following fields in the import table:

  • Search Key - a code for the business partner. In any Business Partner search field, you can use this search key instead of the name to find the business partner.
  • Name - the name that will appear in the business partner fields when you display the C_BPartner_ID field.
  • ISO Country Code - used to define what country to assign to the business partner
  • Region key if the country has regions

Before importing the Business Partner data, ensure you have a good plan.

  • Break the import into groups based on common information and use constants where possible.
  • Importing multiple locations
  • Importing multiple contacts
  • Test with small sets of data

The Import Process

When you click the Import Business Partners button on the {{#if: Import Business Partners|Import Business Partners|ImportBusinessPartners }} Window, the software will do the following:

  • If you selected the option to delete old imported records, the Import BPartner table will be cleared of records where the Is Imported flag is set to true.
  • An update query is run to assign the default columns in the import table (AD_Client_ID, AD_Org_ID, Created, CreatedBy, Updated, UpdatedBy) and to clear the error and Is Imported flag
  • The system will fire the Data Import Validator which will perform any necessary data manipulation prior to the validation
  • The validation process does the following:
    • If the the GroupValue and C_BP_Group_ID fields are null, the GroupValue is set to the maximum Value of the Business Partner Group that is set as default.
    • If the C_BP_Group_ID is null, it is set according to the GroupValue field.
    • After the above steps, if any record still has C_BP_Group_ID set to null, an error message is added to that record.
    • The Country ID is set based on the ISO Country Code. An error is flagged if the Country ID remains null and a City or Address is included in the import data.
    • If no Region Name or ID is defined, the system will attempt to use the default region for the country. If there are more than one default, the last region name in alphabetical order is used.
    • The Region ID is set based on the Region Name. If any Region IDs remain null, an error is added to the error message.
    • If a greeting has been imported, it is matched bay name to the greetings in ADempiere. If no matching greeting is found an error message is added.
    • If the import includes and e-mail address, the system will try to match this with an entry in the list of Users (AD_User table). The Business Partner ID will be set based on the business partner of the user record.
    • If the Business Partner ID is null but the imported Business Partner Value/Search key is not, the software will try to find a match with an existing Business Partner.
    • If the Business Partner ID is not null and no User has been identified but the imported Contact Name is not null, the software will try to match the contact name with an existing contact for that business partner and complete the User ID.
    • If a location address has been imported and the Business Partner identified, the software will attempt to match the location with an existing location for that Business Partner and provide a Location ID
    • If an interest area has been identified, it will be matched with existing interest areas based on the interest area name.
    • If the imported Business Partner Value is null, an error message will be triggered stating that the value field in mandatory.
    • The system will then fire the Data Import Validator again to further process the data after the normal validation above.
    • All changes to the database (specifically, the import table) are committed at this point.

If the "Validate Only" flag was selected at the time of import, the process will return at this point. This allows you to check for obvious errors before the data is imported into the main database and becomes difficult to fix.

Next, the import data is sorted to collect Business Partner records together since a single business partner can have multiple contacts and locations. For each entry:

  • If the Business Partner ID is null - a new Business Partner record is created using the information in the import table.
  • If the Business Partner exists, all fields except the value will be updated with the new information.
  • The Data Import Validator is fired again following the import.
  • The Business Partner Vendor, Customer and Employee flags are set.
  • If the new record can't be inserted or updated, an error message will be set in the import table.
  • The BP locations are created or updated
  • Contacts are created or updated
  • Interest areas are created or updated

All records in the import table which have no errors are then flagged as imported and processed. All records with errors are flagged as not imported. The changes are committed to the database and the process return the statistics on the number of errors, number of records processed and the number imported.

At this point the import is complete and the new data will be available in the {{#if: Business Partner|Business Partner|BusinessPartner }} Window.

Cleaning Up

After performing the import, you will have to modify the business partners to make any specific changes that could not be included with the import.

For Developers

The software that controls the import process can be found in:

  • base/src