Repository navigation
Design Studio and external cart integration
The most common use of the API is to integrate the design studio with a non-InkSoft cart. This can be a cart you've developed internally, or a third-party cart you're customizing like woocommerce or yahoo's cart.
This is the typical end-user experience and API communication this sort of integration involves:
-
User creates their design in the design studio which is embedded on the InkSoft customer's website, goes to "Checkout"
-
User is prompted to select sizes and quantities based on InkSoft product data.
-
After signing in, creating an account, or choosing to checkout as guest, the user's design is saved, the cart for the user is created, the sizes and styles are added to it, and the cart is assigned a session identifier.
-
The user is forwarded to a non-InkSoft page specified in the "CartURL" parameter of the design studio embed code, and the session token, session ID, and user ID are all passed to that page in the URL.
-
That non-InkSoft page will use the session information the design studio passed to it to retrieve the design, product, and size selections the user made and display a "View Cart" kind of page.
-
The non-InkSoft page will use that information to collect whatever they need from the user and go through their custom process. The non-InkSoft page will use our other cart API calls to set the payment terms, shipping/billing address (if necessary), and shipping method for the cart as the user enters that information.
-
Once all the necessary information has been passed to InkSoft via the API, the non-InkSoft page can display a final "review order" page, and when the user places the order, it will call the SaveCartOrder API to place the order in the InkSoft backend.
##Detailed breakdown of API calls and design studio parameters involved in this kind of integration
- For details on how to embed the Design Studio into your existing website, please check our design studio embedding guide. Once the design studio is embedded, you may need to change some of the default parameters you pass to it based on who the user is or how they navigated to the design studio.
- API calls: None (unless you are implementing single-sign-on, in which case you may need to create or retrieve an InkSoft UserID before displaying the design studio). See our single-sign-on page for details.
-
Design Studio Parameters:
- ProductID and ProductStyleID may need to be passed in if you have implemented a custom product page and the user selected a product to customize. These are the InkSoft product identifiers.
- UserID will usually be passed-in if you are implementing single-sign-on
- DesignID or ArtID will need to be passed in if you have implemented a custom art and/or design page and the user selected a design or piece of clip art to customize.
- It is important to note here that the design studio will always use InkSoft product data for quoting, defining printable regions, and selecting sizes in the cart. So you'll need to make sure your product data is up to date and accurate in the InkSoft admin portal.
- API calls: None
-
Design Studio Parameters:
- EnableAddToCart should be set to "true" to enable the "Checkout" button in the design studio.
- Again, all the steps here are determined by InkSoft product data. No API calls necessary yet.
- The CartURL design studio parameter is the key to these kinds of integrations. Before forwarding to CartURL, the design studio adds all the product and art selections to the InkSoft cart. Then it processes the CartURL, looking for the strings "{{SessionToken}}", "{{SessionID}}", and "{{UserID}}", replaces them with the corresponding "live" values, then uses javascript's to forward the user to the URL.
- API calls: None
-
Design Studio Parameters:
- An example CartURL would look something like: "http://yourdomain.com/yourviewcartpage.php?SessionID={{SessionID}}&SessionToken={{SessionToken}}&UserID={{UserID}}"
- For this step, you just want to make sure that you are properly extracting the user's information from the CartURL and associating them with the user for subsequent calls.
-
API calls:
- The most important API call to use here is GetCart. This will allow you to retrieve all the cart information including design, image URL of the design on the product, selected styles and sizes, names and numbers, as well as pricing. You should be able to construct a cart page with all the same information that you see on a standard InkSoft or the Design Studio's built-in cart page.
- If you want your users to be able to save notes to a cart item, you will need to call the SaveCartItemNotes API.
-
API calls:
- As you collect your user's information and save it in your own database or third-party cart, you should also send it to InkSoft so all the relevant order information is available in the InkSoft admin portal when it comes time to fulfill the order. There are a lot of API calls to save this information, you may not need all of them.
-
API calls:
- SaveCartShippingAddress - this one is necessary if you have shipping enabled in your store and want to record shipping information so it's available in the admin portal.
- SaveCartBillingAddress - this one is necessary if you have billing address enabled in your store and want to record billing address information so it's available in the admin portal.
- GetCartPaymentMethods - Returns what payment methods are available for this store/customer/protocol. You may choose to skip this API call and always send in "Arrange Payment Later" for payment terms when placing the order, since most customers doing this sort of integration collect payment using a third-party service during checkout.
- GetCartShippingMethods - gets shipping options based on store settings. You may not need this if you are implementing your own shipping method logic.
- GetCartShippingAddresses - gets saved shipping addresses for this user. Only use this if you have a value for UserID from CartURL.
-
API calls:
- When your customer has entered all their billing, shipping, and payment information, the last step is to call GetCart again and display a review order page (probably very similar to the GetCart page).
-
API calls:
- Like the View Cart page, the review order page calls GetCart and typically displays products, sizes, and pricing. It will have updated totals based on the tax and shipping rules now that you have saved shipping and billing information.
- SaveCartOrder is the final API call to make when placing an order. Simply pass it the payment type and the cart_total from the last GetCart call (InkSoft validates that the total passed in is the same as what our pricing rules say it should be as a final check).
-
API calls: