Uploading test data from CSV file?

Hi,

I have a simple requirement for test data. I want to be able to create a set of data records in a table from a file. For example I want to be able to add a range of Orders. I envisage it as CSV something like this:

contactID; cardID; planID; productIDs; subscriptionIDs; processSpecials; promoCodes; leadAffiliateID; saleAffiliateID
1234; 0; 0; 4321; 2341; false; ; 0; 0

This is straightforward using the ‘legacy xml-rpc’ data API: DataService.add. So what I’d want is a command line tool that I’d use like this:

infusionsoftupload %MyAPIKey% Orders < data.csv

Clearly I could write it in Python or something. But it seems a very general purpose tool – has anyone written it (and perhaps corresponding tools to modify records, and select and download records as well)?

Certainly it’s possible but most devs will use things like phpStorm/PyCharm/DataGrip or MySQLWorkbench to manipulate that kind of information. I’m sure there are also online tools that would accomplish similar.

Err - I’m sure we all know that developers will use development environments! :slight_smile:

But, certainly, an online tool would be another way to approach it. Has anyone developed an online service that would take a file of test (or other) data and add it to an arbitrary Infusionsoft table?

  • Charles

Sorry, @Charles_Weir,

As this is in the API forum we try to answer completely. No assumptions were meant :wink:

Have you checked out Zapier or Parsey?

I haven’t seen any tool like this yet out on the web; we use one that dumps the data directly into the database for internal testing.

Additionally, if you are looking at building one I’d recommend using the REST API rather than XML-RPC for generating records, as we will at some point be depreciating the XML-RPC interface.

I’ve implemented the tool here:

Enjoy!

  • Charles

Hi Charles,

We have an advanced importer that can do this. It’s kind of in the beta stage, but it is functional and IMHO pretty awesome (easy to use yet powerful). It lets you import just about any csv file into Infusionsoft in any way you specify.

You can specify foreign key columns like the example you provided or take a csv file with order info and create everything required (payment, products, order, contact, etc…) all while tracking what’s been imported and what hasn’t, allowing you to re-run failed records after tweaking things, saving the mapping configuration so you can easily re-run it, and automatically track and handle dupe checking. (i.e. if your file has a primary key from another system the importer tracks this and won’t re-create records it’s already created from other files, just update them).

We don’t have any info on it available publicly (it’s a tool that we only present to people when it’s what they need). But the cost is $50 / mo. If you have one of our free tools (http://novaksolutions.com) I can enable it for you as a trial and you can see if it meets your needs. (Just send me your app name if you already have one of our tools, otherwise signup and then send me your app name.)

Joey