Purpose

External checkout integration allows you to host your main website separately to DecoNetwork and only link to your Altacolor DecoNetwork site to allow the customer to customize and purchase your Altacolor DecoNetwork products. The cart and checkout process is managed on your external site. This allows your existing e-commerce site to integrate with DecoNetwork, where the one order will have a mix of Altacolor DecoNetwork products and products you already sell on your site.

Prerequisites

  • You must be on the Enterprise plan to use this feature
  • Programming experience is required to integrate with Altacolor DecoNetwork using External Checkout Integration. All integration is done using browser links and direct server-to-server communication across HTTPS.
  • All payments will be marked as “External API Payment” which acts like a manual payment. It is your responsibility to make sure this payment is valid.
  • The External Cart API app must be enabled (Go to Admin > Apps Store in the Fulfillment Center to enable the app).

To enable the External Checking Integration API app in DecoNetwork

  1. Log into your Altacolor affiliate website.
  2. Browse to Admin and select the yellow + Apps Store button at the bottom of the Main Menu.
  3. Scroll to the Website Tools section.
  4. Click Add now on the External Cart API app.

Overview

Actors:

  • External Website: Your existing website that sells products and has a cart/checkout process.
  • Altacolor DecoNetwork Website: Your Altacolor DecoNetwork website that allows customers to customize blank products, sell decorated products, and sell designs on products.
  • Customer: Your customer who will be following links between the external website and the Altacolor DecoNetwork website using their browser.

Workflow:

  1. Your customer will be browsing your external website, and viewing products. The products will be a mix of non-decoratable products that you are selling already and Altacolor DecoNetwork products. Adding the Altacolor DecoNetwork products to the external website is outside the scope of this document, and depends on the implementation of the external website.
  2. The customer clicks on a Altacolor DecoNetwork product.
  3. The customer is directed to the Altacolor DecoNetwork website, specifying the product/size and color.
  4. The customer decorates the specified product and clicks “Add to cart”.
  5. The customer is redirected back to the external website with details about the product just added.
  6. The external website will parse the parameters and add an entry to the cart to represent the line item just added through Altacolor DecoNetwork. The parameters contain a unique ID, thumbnail URL, edit URL, and other description/pricing fields that can be used to display the line item in the external cart.
  7. The customer continues browsing on the external website.
  8. The customer checks out on the external website and pays for the order.
  9. Money is taken through the external website.
  10. The external website then makes a direct call using HTTPS to the Altacolor DecoNetwork website to “commit” the order lines that have been just purchased. This call is server to server.
  11. An order will be added to your Business Hub containing the line items committed after checkout has been completed via your external cart.

A note on external cart tracking:

If an external cart/order ID (generated at your end) is passed through whenever a call is made to the Altacolor DecoNetwork API, the order held at Altacolor DecoNetwork’s end will persist across multiple sessions, even if the individual order line items have not been committed.

If no external cart/order ID is passed through to Altacolor DecoNetwork, the default behavior is assumed, and line items cannot be edited in a different session (for example, if a user closes their browser).

Linking to Altacolor DecoNetwork to load a product

At some point on your website, the customer will click a link that will take them to your Altacolor DecoNetwork website to allow the customer to purchase a product defined in Altacolor DecoNetwork. This is step 3 in the above workflow.

The information required to make load product calls is included in the Data Feed XML documents you can export from the Altacolor DecoNetwork website admin. The data feed can be accessed at
https://<altacolor_store_secure_url>/manage/data_feed

URL:

https://<altacolor_store_secure_url>/external/load_resource?<parameters>

Parameters:

NameDescription
mode

designer: load a blank product into the designer.

designer_predec: load a decorated product into the designer.

blank: load a blank product into the product details page.

predec: load a decorated product into the product details page.

view_design: load a design into the design details page.

design: load the design on the product page with the specified design and blank product.

productThe ID of the blank product, or when the mode is “predec/designer_predec”, the ID of the decorated product. Not used when mode is “view_design”.
sizeThe id of the size
quantityThe quantity to populate into the specified size
color_idThe id of the color.

Pre-v8.5 customers, please note that the “color” field has been deprecated. You need to use “color_id” from now on.

designThe id of the design (only applicable when the mode is “design” or “view_design”)
callback_add_urlThe URL to redirect the customer back to when they click add to cart
callback_cancel_urlThe URL to redirect the customer back to when they click the “close” button on the popup designer
calback_param_XXXXYou can add call-back parameters which will be added when the customer id redirected back to the external website after adding the item to the cart. Note: only the part after “callback_param_” is sent back. E.g.: if callback_param_XXXX=123 was passed, then XXXX=123 would be a parameter sent to the callback_add_url.
oidExternal cart or order ID. This should be unique for each order.
cart_holdThe number of days an open (unfinished) order will be kept on Altacolor DecoNetwork’s end from the date the order is created (default 30 days, maximum 60). An order is created when a user clicks “Add to cart”.
iframe_modeIf you are embedding your Altacolor DecoNetwork site in an iframe, set the iframe_mode parameter to 1 so the Altacolor DecoNetwork ‘session identifier’ will be passed in the request URL instead of a cookie because some browsers will not pass cookies to iframes on a different domain.

Processing “Add to cart” callback:

After the customer has added an item to their cart, they will be redirected back to the external website with a list of parameters describing the product just added to the cart. The external website will then add an item to their cart to represent this Altacolor DecoNetwork product. Because of the amount of metadata against a Altacolor DecoNetwork product, the full definition of the line item remains in Altacolor DecoNetwork, with enough information to link and display the line item sent back to the external website. This is step 6 in the above workflow.

The URL the customer is redirected back to will either be the “callback_add_url” passed during the initial link or the “Add To Cart callback url” specified against the website in the Store Settings.

Parameters:

NameDescription
idThe unique id of the line item in Altacolor DecoNetwork. This is used to commit the order.
nameThe name of the product ordered.
tnA URL to a thumbnail relative to the Altacolor DecoNetwork website.
optionsAn HTML string of the options chosen (including size)
qtyThe line item qty specified on the item
discountThe discount amount applied to the item
taxTax amount applied to the item
line_totalThe total amount of the line item
edit_linkIf you want the customer to be able to edit the item, you can direct them this URL. The URL is relative to the Altacolor DecoNetwork website. When the customer edits a line item and clicks the update button they will be redirected back to the same callback URL with the same unique ID, but with details updated.
ecA list of extra charges associated with the line item. Note the extra charge information will be passed back with each line item even if it’s a reused charge. On Altacolor DecoNetwork, extra charges are only applied once per order; your cart will need to use similar logic to only add an extra charge if it’s not already in the cart.

Includes the following parameters: ID, name, total

Committing Altacolor DecoNetwork order lines:

The external website needs to notify the Altacolor DecoNetwork website when the checkout process is completed to let Altacolor DecoNetwork know that the items have actually been ordered. This will make the order appear on the Altacolor DecoNetwork Business Hub and Production Screens.

URL:

https://<altacolor_secure_url>/external/commit_order?<parameters>

Parameters:

NameDescription
idsA list of comma-separated line item IDs returned from the “add to cart” call-back.
authThe “Commit Order Password” from the store settings. This is to ensure that only authorized entities can commit an order.
user_idOptional parameter; can be included to assign the order to an existing customer. User IDs are passed back as a response to the commit order request and can be stored on the external cart for future reference.
shipping_method_idThe id of the shipping method. If not passed, the “Default Shipping Method” from the store settings is used.
mark_as_paid{true|false} If true, then the order will be marked as paid. If not true, then the manual payment method will need to be confirmed before it goes into production.
invoice_idOverride the invoice ID of the order. MUST BE UNIQUE. If not used, the default Altacolor DecoNetwork invoice ID is used.
oidExternal cart or order ID. This should be the same ID that was sent during the load_resource request. If any line items have a different external order ID, the entire commit will fail.
billing_emailCustomer billing details
billing_country_codeCustomer billing details – 2 letter country code (UPPERCASE)
billing_firstnameCustomer billing details
billing_lastnameCustomer billing details
billing_zipCustomer billing details
billing_companyCustomer billing details
billing_salutationCustomer billing details
billing_ph_numberCustomer billing details
billing_streetCustomer billing details
billing_cityCustomer billing details
billing_stateCustomer billing details
separate_shipping_detailsProvide separate customer shipping details? {true|false}
shipping_country_codeCustomer shipping details – 2 letter country code (UPPERCASE)
shipping_firstnameCustomer shipping details
shipping_lastnameCustomer shipping details
shipping_zipCustomer shipping details
shipping_companyCustomer shipping details
shipping_salutationCustomer shipping details
shipping_ph_numberCustomer shipping details
shipping_streetCustomer shipping details
shipping_cityCustomer shipping details
shipping_stateCustomer shipping details

Commit Response:

If the commit succeeds, the HTTP code will be 200 with 3 lines of text:

OK
INVOICE_ID
USER_ID

If the commit fails, the HTTP code will be 500 with 2 lines of text:

ERROR <NUMBER>
ERROR_DESCRIPTION

PHP Sample Code:

An example implementation in PHP is available. Download now.

Removing a Altacolor DecoNetwork order line:

The external website needs to notify the Altacolor DecoNetwork website when a line item that has extra charges is removed from the external cart.

URL:

https://<altacolor_secure_url>/external/remove_item?<parameters>

Parameters:

NameDescription
idThe line item ID returned from the “add to cart” call-back.
authThe “Commit Order Password” from the store settings. This is to ensure that only authorized entities can remove an item.
oidExternal cart or order ID. This should be the same ID that was sent during the load_resource request.

Remove Item Response:

If the remove succeeds, the HTTP code will be 200 with 2 lines of text:

OK
INVOICE_ID

If the remove fails, the HTTP code will be 500 with 2 lines of text:

ERROR <NUMBER>
ERROR_DESCRIPTION