New Member
Posts: 23
Registered: ‎04-07-2018

[UCRM API] Example script for importing Clients with Services via UCRM API

[ Edited ]

I have about 450 clients in an Excel spreadsheet,

It includes Name, Address Telephone etc, and the Service name

All I need to do is import these clients into UCRM with the services.

 

I tried the CSV import, but this only imports everything else besides the Services.

 

My spreadsheet looks like this:

 

NameStreet AddressIP PlanConnected to
jo@isp 12 sample10.0.1.130 2Mbps Home Uncapped [1:7]CoreRouter
new@isp39 biew st 10.0.1.173 4Mbps Home Uncapped [1:7]CoreRouter
client5@isp88 cob ave 10.0.1.44 2Mbps Home Uncapped [1:7]CoreRouter

 

I can program in Delphi, and know a bit of PHP.


If anyone has already coded an import script please share it with me 

 

Secondly

How would I use the API via Delphi?

Ubiquiti Employee
Posts: 4,170
Registered: ‎12-10-2015
Kudos: 1476
Solutions: 315

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

@DavidG1987
If you want to try Delphi to create a custom API script, you can but we recommend PHP because it can be shared easily with others and also it could be upgraded into UCRM Plugin.

Eventually, we can help with the UCRM Plugin (based on PHP and API) but I can't give you any ETA (give us a couple of weeks).


New Member
Posts: 23
Registered: ‎04-07-2018

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

I was hoping for a complete example of an import script.. 

Highlighted
Ubiquiti Employee
Posts: 4,170
Registered: ‎12-10-2015
Kudos: 1476
Solutions: 315

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

Yes, we will add this to our scope.

Emerging Member
Posts: 111
Registered: ‎03-05-2018
Kudos: 53

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

@DavidG1987 You would need to use cURL in Delphi, i'm not familiar with Delphi itself but in order to conect to the API you would need to connect via cURL. 

 

As far as PHP goes, a simple function that can read the csv file should be enough to loop through the records and do whatever you need it to do. 

 

PM and i can probably help you further if you still need it.

Ubiquiti Employee
Posts: 4,170
Registered: ‎12-10-2015
Kudos: 1476
Solutions: 315

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

@DavidG1987 in a couple of days, we will release v2.12.0-beta2 incorporating an improved client CSV import enabling you to import clients with their services (including billing parameters etc.) Please follow this forum and UCRM changelog.
New Member
Posts: 23
Registered: ‎04-07-2018

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

Wow, that would be great. Meaning I can set whether the client billing should be Forward or Backward for example?

Ubiquiti Employee
Posts: 4,170
Registered: ‎12-10-2015
Kudos: 1476
Solutions: 315

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

yes, Forward/Backward invoicing type is part of service's invoicing configuration and while importing clients you will be able to add their services with this config.
New Member
Posts: 23
Registered: ‎04-07-2018

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

How can I import IP addresses of clients?

Ubiquiti Employee
Posts: 4,170
Registered: ‎12-10-2015
Kudos: 1476
Solutions: 315

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

This is the API endpoint to create a service device along with its IP: https://ucrm.docs.apiary.io/#reference/service-devices/clientsservicesidservice-devices/post
Member
Posts: 107
Registered: ‎05-31-2014
Kudos: 3

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

Any news about importing IP`s for clients when migrating ? I realy need some help for this. I want to put ucrm in production, but importing hundreds of clients manualy, were mitake occur, is not the way to do it.

Member
Posts: 217
Registered: ‎04-26-2013
Kudos: 88
Solutions: 3

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

Hi,

CSV import is missing Client ID.

 

We have nearly 1000 customers, which already has Client IDs. I can't import them because og missing Client ID in the CSV

 

Any building a plugin som importing customers directly from excel?

/Simon
Ubiquiti Employee
Posts: 4,170
Registered: ‎12-10-2015
Kudos: 1476
Solutions: 315

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

@SimonK the internal ID cannot be imported, this number is automatically generated for each newly created or imported client. However, you can use "Custom ID", which can be manually modified or imported from csv, check out the first mapping field:

2019-05-21_09-47.png

Member
Posts: 107
Registered: ‎05-31-2014
Kudos: 3

Re: [UCRM API] Example script for importing Clients with Services via UCRM API

still waiting for IP import intergation. Our UCRM server is not in productions basically for this issue... pls help !