Jump to content

Bulk import of contacts?


lee mcdermott
 Share

Recommended Posts

@lee mcdermott

Just a note to confirm that the organisation record needs to exists and at the moment you have to manually create any new organisations first, as there is no tool at the moment to bulk create organisations.

Also it is worth having a think about the defaults you want to set at the top of the conf file, in relation to the Customer Portal, as going back and doing this manually on each contact is quite time consuming.

"AttachCustomerPortal": true, /* options : true/false ; whether contact is allowed to enter the customer portal */
   "CustomerPortalOrgView": true, /* options : true/false ; whether contact is allowed to view orgaisation calls in the customer portal */
   "CustomerPortalOrgViewRevoke": false, /* options : true/false ; whether the contact visibility to organisation calls in the customer portal is to be revoked */
   "UpdateContactStatus": false,

Also if you can connect the tool to a database as well as the CSV connection. Below is example conf for a MySQL DB.

 

 "SQLConf": {
        "Driver": "mysql",
        "Server": "localhost",
        "Database": "oo",
        "UserName": "user",
        "Password": "xxxxxxxxx",
        "Port": 3306,
        "ContactID": "zendesk_id",
        "FieldID": "h_logon_id",
        "Encrypt": false,
        "Query": "SELECT * FROM oo.oocontact_import where organization_id<>1229"
    },

 

Cheers

Martyn

Link to comment
Share on other sites

  • 1 month later...

@James Ainsworth

Hi James finally managed to get around to trying this as I have been off for a while.

 

I have managed(eventually) to get the files downloaded and setup. When i run the utility it says it connects but doesn't seem to create the contact in the csv file see screen shots below.

I noticed the instructions on your wiki mentions a  Schema.ini file which seems to dictate which fileds contain which type, but I cannot find a schema.ini file anywhere so not sure if i need this.

The csv file doesnt contain a header row as the example on the wiki doesn't appear to have one and I wasn't sure what to put in if it did need one? Not sure if this is anything to do with the issue?

any idea? I have tried adding and removing extra fields in both the csv file and the mapping file.

 

thanks

lee

 

csvfile.JPG.f9ec8cf4c822c0f8b199fec026db34c1.JPGcontactimportcmd.JPG.d7bd337d654af15d623b3215c56d4968.JPG

contactlog.JPG

contactmapping.JPG

Link to comment
Share on other sites

  • 2 weeks later...
  • Deen changed the title to Bulk import of contacts?

@Martyn Houghton

hi martin

 

screen shot attached. I have just ran it again as i noticed the column header was ticked and as you can see from my csv file above i do not have any column headers.

I ran the utility again and it has ran ok this time.

 

However it has not created a contact called Atest?

 

it says successful and given a contact ID  - but when checking in contacts in Hornbill I can see contact ID it created but all the values are empty?

 

Any ideas. I suspect something to do with the CSV file and format , do I need to use column headers?

odbc.JPG

hornbill contact.JPG

Link to comment
Share on other sites

@Martyn Houghton

 

Hi Martin

 

"APIKey": "******************",
    "InstanceId": "*************",
    "ContactAction": "Create",
    "AttachCustomerPortal": true,
    "CustomerPortalOrgView": true,
    "CustomerPortalOrgViewRevoke": false,
    "UpdateContactStatus": false,
    "SQLConf": {
        "Driver": "csv",
        "Server": "localhost",
        "Database": "CSV64",
        "UserName": "**********",
        "Password": "*******",
        "Port": 5002,
        "ContactID": "FIELD1",
        "FieldID": "h_logon_id",
        "Encrypt": false,
        "Query": "SELECT * FROM adbc.csv"
    },
    "ContactMapping": {
        "logon_id": "{{.FIELD1}}",
        "firstname": "{{.FIELD2}}",
        "lastname": "{{.FIELD3}}",
        "company": "{{.FIELD4}}",
        "email_1": "{{.FIELD5}}",
        "email_2": "",
        "tel_1": "",
        "tel_2": "",
        "jobtitle": "",
        "description": "",
        "notes": "",
        "country": "",
        "language": "",
        "private": "0",
        "rights": "0",
        "contact_status": "0",
        "custom_1": "",
        "custom_2": "",
        "custom_3": "",
        "custom_4": "",
        "custom_5": "",
        "custom_6": ""
    }

 

 

csv.JPG

Link to comment
Share on other sites

@lee mcdermott

The contact rows in the csv file need to be  encased in "", i.e. "BTest@test.co.uk","B"..........

Then update json 
 "ContactID": "logon_id",
        "FieldID": "h_logon_id",
        "Encrypt": false,
        "Query": "SELECT * FROM adbc.csv"
    },
    "ContactMapping": {
        "logon_id": "{{.logon_id}}",
        "firstname": "{{.firstname}}",
        "lastname": "{{.lastname}}",
        "company": "{{.company}}",
        "email_1": "{{.emial_1}}",

 

Then give that a go.

Cheers

Martyn

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...