Connecting to external APIs to pass product information
I started to learn about the QueryBuilder, because I need to pass product info, just basic, name, description, stock and price to an API in a CRM, but so far I couldn't find more information on the subject of using APIs to connect to external applications, I will probably use a curl method and json to send the data, to the recipient's database, as I already have an automated inventory system, the only thing I need is to pull the data and connect to the other app's API, to pass it, probably using automation as well.
This process will be in the background, initially for connecting to my CRM, then probably using it to pass data to marketplaces, it's a nightmare to manually fix thousands of products, even using spreadsheets, on a daily basis, so uploading an updated, current, accurate inventory is a must, as I couldn't find any current solutions to do this, I will write my own, just looking for some hints and common practices, about where to look to get the info I need to build the apps.
Please don't suggest to hire someone, because I am in a dire economic situation, just using my brains and my knowledge to accomplish something by myself.
[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]
Re: Connecting to external APIs to pass product information
Well, I keep banging on about this...Pentaho Data Integration Community.
In short it is a method to get data from A, manipulate it in multiple simple steps, then send it to B. A and B can be any database or filetype.
I use it to extract product data from a dBase legacy system to a csv, then use my own script to get that into my shop db. Pentaho could do it all but I have a lot of oddities that need special treatment and I did that in the script.
Pentaho can produce a job file that can be run automatically.
Re: Connecting to external APIs to pass product information
EasyPopulate V4 has a cron task that can import a file to the database. Haven't incorporated export directly into a cron task yet. Hadn't really been asked and I haven't had a reason to have it yet.
Re: Connecting to external APIs to pass product information
Quote:
Originally Posted by
torvista
Well, I keep banging on about this...Pentaho Data Integration Community.
In short it is a method to get data from A, manipulate it in multiple simple steps, then send it to B. A and B can be any database or filetype.
I use it to extract product data from a dBase legacy system to a csv, then use my own script to get that into my shop db. Pentaho could do it all but I have a lot of oddities that need special treatment and I did that in the script.
Pentaho can produce a job file that can be run automatically.
Well Torvista! Thanks for the tip! I'll look into Pentaho, I was looking at some solutions, my idea was to query the db, and then with the data stored somewhere create a csv and then use js to generate a JSON file. As there's no API for zencart to connect to other platforms I was planning to do something custom, but wasn't sure if I would run into conflicts, if I used the Zen Cart Query suite just to retrieve information directly from products instead of doing joins to achieve the same result using plain SQL.
BTW I noticed you ported Apsona to PHP 7, is it still working? I do have an old ID, it was pretty good to check prices and inventories, although I made my own custom auto inventory system, my problem is I can't find a way to prevent the system from using the default images directory for product images, instead of my cloud URL, it does work sometimes, but not with Zoomed
images, I use a jQuery plugin to navigate the zooomed ones the problem is the template adds
Code:
https://www.mydomain.com/shop/images/https://www.mycloud.com
so evidently fails, no matter where I performed a search I couldn't find a way to prevent this from happening, even by canceling some concatenation rules in the string that's pulled by the templates.
Re: Connecting to external APIs to pass product information
I use DBIO instead of Apsona, so should everyone. Makes no sense to use long-unsupported code when there is an alternative.
Pentaho can do anything. Often it is not intuitive and frustrating, lots of trial and error but it is worth the effort.
Re: Connecting to external APIs to pass product information
Steve, is Pentaho something you'd be willing to write up in the documentation for the community?
Re: Connecting to external APIs to pass product information
To be honest I can't add anything more...it's a Swiss Army Knife of data manipulation. I used it x years ago to set up the data extraction process, and have not used it for anything else since, not hardly touched the "job" that does the extraction. It's just worth knowing that such an open source tool exists.