Integrating with AbleCommerce via APIs

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
TheSunTheSea
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Tue Aug 24, 2010 10:54 am

Integrating with AbleCommerce via APIs

Post by TheSunTheSea » Tue Aug 24, 2010 10:59 am

Hi everyone,

Sorry if this question has been asked many times, but I really couldn't find documentation on the subject matter.

I'm looking for an effective way to integrate my web application with AbleCommerce. Specifically, I'd like to replicate customer information between AbleCommerce and my web app. Any time a new customer is created in AbleCommerce, I'd like that customer to exist in my app's system as well. What I was thinking of as a solution would be to leverage an API exposed by AbleCommerce to get all customers, or even better would be to get customers created since a certain date (something like that).

Ideally I'd like to have my web application save customers into AbleCommerce's system as well, so that both systems will have the same customer base. Sharing a DB isn't an option since my web app isn't an eCommerce site.

Anyways, does AbleCommerce expose a set of APIs to use? Or do I have to access the AbleCommerce DB directly? Thanks for the help!

User avatar
mikek
Commander (CMDR)
Commander (CMDR)
Posts: 112
Joined: Wed Oct 15, 2008 9:30 pm
Location: Boston, MA
Contact:

Re: Integrating with AbleCommerce via APIs

Post by mikek » Tue Aug 24, 2010 12:35 pm

Hello,

Accessing the database directly is not a good development practice and should be avoided. Binding your code to the current DB schema may introduce hard to debug issues in the long
run if the database schema gets updated by AbleCommerce patch or upgrade script.

The best way is to utilize CommerceBuilder API (most of the functionality is available in CommerceBuilder.dll). For additional information please refer to:

http://wiki.ablecommerce.com/index.php/ ... uilder_API

You can also use Reflector for discovering classes and methods not documented in the wiki.
Mike Kolev

TheSunTheSea
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Tue Aug 24, 2010 10:54 am

Re: Integrating with AbleCommerce via APIs

Post by TheSunTheSea » Tue Aug 24, 2010 1:05 pm

Thanks for the info. Using reflector is a good idea. I don't have the AbleCommerce install on my local machine, however. Do I need a license to obtain the CommerceBuilder.dll?

TheSunTheSea
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Tue Aug 24, 2010 10:54 am

Re: Integrating with AbleCommerce via APIs

Post by TheSunTheSea » Tue Aug 24, 2010 5:41 pm

Off hand, would anyone know which APIs to use to get and update Customer information? The API documentation page doesn't have any topics on this matter

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Integrating with AbleCommerce via APIs

Post by mazhar » Wed Aug 25, 2010 12:46 am

Read Data Access Layer and Custom Queries topics from link below.
http://wiki.ablecommerce.com/index.php/ ... uilder_API

For example in order to load users for certain date you can either write your custom query or can try to used load for criteria method. For example

Code: Select all

UserCollection users = UserDataSource.LoadForCriteria("CreatedDate='14082010'")
//DO THE OPERATIONS ON LOADED USERS FOR EXAMPLE IN ORDER TO LOOP
foreach(User user in users)
{
string userName = user.UserName;
.........................................
.........................................
}

Post Reply