Jump to content
  • 0

Import Client Data From Csv?


Dipps

Question

Hi guys. I read about the Import Manager but my client data is not in another app.. it's in a mess of little databases. I could gather it into a CSV or similar, but would I be able to get that into Blesta? (No, I'm not a PHP wizard.)

 

Don't need to enter products or accounting info this way - mostly client name, address, billing email address. I have about 600 small clients who will have the same product, and putting them all in by hand would be painful.

 

Haven't used something like Blesta before, so still reading.

 

Thanks.  Pete

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

It sounds like you may need a custom import for your data. Besides the basic name, email, phone, and address settings, clients in Blesta have login credentials, services, invoices, transactions, payment accounts, contacts, etc. You may not have (or need) all of that data to be imported, but it would be necessary to know more details on all of the data that you want to import.

Link to comment
Share on other sites

  • 0

Thanks Tyson.. sounds likely.

 

Seems likely I'm the only one who would use this, I could try making an importer myself. It doesn't need to be pretty. Is there anything similar I could start from?

Just found the Developers Guide so there's more reading for me :)

 

Yeh most of those extra variables could be set to 0 or a safe default. None of these customers have any relevant history.

Edited by Dipps
Link to comment
Share on other sites

  • 0

Most hosting control panel have a way to import data from csv, so I recommend you to use it .

 

As only one database table is concerned "customers", it's not so hard to import.

 

Create an excel file, and make all colums match to blesta customer table, and export your excell file as csv, next use this csv file to import your data in the blesta table

Link to comment
Share on other sites

  • 0

You would need to create users and contacts based on those clients as well, so it is a little more complex than importing data into a table. If you are familiar with PHP, you may want to take a look at writing a script to utilize the API to create clients. If you do it this way, you can be sure that there is no missing or invalid data, as Blesta will perform error checking during the import.

 

Take a look at the API and creating a client.

Link to comment
Share on other sites

  • 0

So where the Clients method summary says "create( array $vars )" - is there doco for what has to go into $vars ?

 

Click on that text and the details should appear below it. The documentor isn't formatting the fields onto new lines for some reason, so you may want to do that yourself for better readability:

Clients::create( array $vars )

Vars
An array of client info including: 
- username The username for this user. Must be unique across all companies for this installation. 
- new_password The password for this user 
- confirm_password The password for this user 
- client_group_id The client group this user belongs to 
- status The status of this client ('active', 'inactive', 'fraud') (optional, default active) 
- first_name The first name of this contact 
- last_name The last name of this contact 
- title The business title for this contact (optional) 
- company The company/organization this contact belongs to (optional) 
- email This contact's email address - address1 This contact's address (optional) 
- address2 This contact's address line two (optional) 
- city This contact's city (optional) 
- state The 3-character ISO 3166-2 subdivision code, requires country (optional) 
- zip The zip/postal code for this contact (optional) 
- country The 3-character ISO 3166-1 country code, required if state is given (optional) 
- numbers An array of number data including (optional): 
    - number The phone number to add 
    - type The type of phone number 'phone', 'fax' (optional, default 'phone') 
    - location The location of this phone line 'home', 'work', 'mobile' (optional, default 'home') 
- custom An array of custom fields in key/value format where each key is the custom field ID and each value is the value 
- settings An array of client settings including: 
    - default_currency 
    - language 
    - username_type 
    - tax_id 
    - tax_exempt 
- send_registration_email 'true' to send client welcome email (default), 'false' otherwise
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...