Contacts CSV import


#1

I need to import a large number of contacts. I tried to follow the instructions reported in https://docs.axelor.com/adk/5.0/dev-guide/data-import/csv-import.html without any success.
I am asking if someone has a xml and a contact related csv file working as an example.
Thank you in advance


#2

Hello,
You may try to import data directly on Postgresql database by using PGadmin instead of Axelor user interface.
Regards
Eric


#3

Hi,

I don’t think that update the db was a good way to import.

“Contact” is not a domain itself, “Contact” is a “Partner” object with some specific flag to be taken as a contact and not as a company.

Maybe you could have a look here modules\abs\axelor-base\src\main\resources\demo\fr to see how to correctly setup your import file.


#4

Hi All,
Thanks for the answers. I’ll try with PGadmin but I understand that the contact record is a complex “thing” and the different roles depend on flags.
I have already analyzed the xml file in modules\abs\axelor-base\src\main\resources\demo\fr even if the English version.
However I need to isolate part of the xml file in order to use only the portion that refers to contacts / partners records because I want to import only them.
This is why I am asking if anyone has ever tried to do this type import.
your help would be appreciated
Thanks
Gabriele


#5

hi,
I never have to import contacts but I don’t think that it’s a huge task. All depends on what you need to import for a contact entry: user base info (names, email…), address, company, etc…

Could you please specify which fields you want to fill and maybe I could help you to isolate part your require.

Regards


#6

HI,
Thank you for your cooperation. Below I will list all the fields I want to import. The idea, I hope it’ s right, is to take the contacts I have and store them. The fields are:
“importId”; “partnerTypeSelect”; “isContact”; “isCustomer”; “isSupplier”; “isEmployee”; “name”; “firstName”; “titleSelect”; “languageCode”; “address”; “email”; “fixedPhone”; “mobilePhone”;
in this way I should have the contacts classified in the correct categories and then, through axelor, I could transform them into lead, customers and so on.
I tried with a very trivial file. The import ends without errors but nothing is imported. Unfortunately I’m new to axelor and I’m having some difficulties.
Gabriele
these are the files I am using
XML

<?xml version="1.0" encoding="UTF-8"?>









<input file="partner01.csv" separator=";" search="self.importId = :importId" update="true" type="com.axelor.apps.base.db.Partner"
	call="com.axelor.csv.script.ImportPartner:updateContacts">
	<bind column="importId" to="importId"/>
</input>
"importId";"partnerTypeSelect";"isContact";"isCustomer";"isSupplier";"isEmployee";"name";"firstName";"titleSelect";"languageCode";"address";"email";"fixedPhone";"mobilePhone";"invoiceSendingFormatSelect";"paymentMode.importId";"paymentCondition.importId";"partnerCategory.code";"currency.code";"blockingList.importId";"rejectCounter";"companySet_importId";"customerAccount_code";"supplierAccount_code";"mainPartner_importId";"customerTypeSelect";"supplierTypeSelect";"industrySector.importId";"user.importId";"team.importId";"source.id";"fiscalPosition.importId";"picture_fileName";"invoicesCopySelect" 900;1;"false";"true";"true";"false";"APOLLO11313";;;"fr";90;"info@APOLLO11313.fr";"04.35.78.88.99";;"emailpaper";8;6;"SME";"EUR";;;1;4121100;4021100;;3;1;4;11;2;5;;;190110 901;1;"false";"true";"true";"false";"APOLLO11414";;;"fr";90;"info@APOLLO11414.fr";"04.35.78.88.99";;"emailpaper";8;6;"SME";"EUR";;;1;4121100;4021100;;3;1;4;11;2;5;;;1 902;1;"false";"true";"true";"false";"APOLLO11515";;;"fr";90;"info@APOLLO11515.fr";"04.35.78.88.99";;"emailpaper";8;6;"SME";"EUR";;;1;4121100;4021100;;3;1;4;11;2;5;;;1 903;1;"false";"true";"true";"false";"APOLLO11616";;;"fr";90;"info@APOLLO11616.fr";"04.35.78.88.99";;"emailpaper";8;6;"SME";"EUR";;;1;4121100;4021100;;3;1;4;11;2;5;;;1

The result !!!