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!
Integrating with AbleCommerce via APIs
-
- Ensign (ENS)
- Posts: 3
- Joined: Tue Aug 24, 2010 10:54 am
Re: Integrating with AbleCommerce via APIs
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.
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
-
- Ensign (ENS)
- Posts: 3
- Joined: Tue Aug 24, 2010 10:54 am
Re: Integrating with AbleCommerce via APIs
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?
-
- Ensign (ENS)
- Posts: 3
- Joined: Tue Aug 24, 2010 10:54 am
Re: Integrating with AbleCommerce via APIs
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
Re: Integrating with AbleCommerce via APIs
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
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;
.........................................
.........................................
}