Integrating Liftoff with Spoke Custom for Print-On-Demand Using Order Desk

August 07, 2024 05:00 AM
In our previous article, we introduced Order Desk, a powerful order management tool. Today, we'll show you how to integrate Liftoff Commerce with Spoke Custom using Order Desk. With this powerful combo, we'll add a print-on-demand mug to our store, which, upon order, will be automatically fulfilled by Spoke Custom. 

Note: Order Desk supports numerous print-on-demand suppliers right out of the box. We chose Spoke Custom because of their strong association with PCNA. I toured Spoke Custom about seven years ago, and they’re truly a great team to work with. If you wish to follow along and set up Spoke Custom in Order Desk for yourself, you'll need an account with Spoke Custom – get started here. If you already have a login to their Partner Portal, that won't be enough. Reach out to your contact to inquire about API credentials.              

Prerequisites

There is a lot to learn about Order Desk, but their extensive knowledge base provides plenty of helpful information. Although we won't cover everything in this post, you can sign up for a 30-day free trial (no credit card required) and follow along.

There are a few Order Desk concepts that I want to note first before we begin.
Orders go into folders.
In Order Desk, every order is categorized into folders. By default, you'll find folders for New, Prepared, Closed, Canceled, and All orders. Think of folders as digital trays for organizing job jackets.
Rules power the automation.
Rules in Order Desk are crucial for automating order management and fulfillment. They allow you to define actions based on specific events and filters, offering a high level of customization.
Inventory Items are cool but optional.
Order Desk can store your product details to help automate workflows and sync with fulfillment providers. While we won't use Inventory Items in this integration to avoid managing product data in multiple places, they can be valuable for other print-on-demand projects.
Item metadata is crucial.
Item metadata in Order Desk functions like tags, adding crucial details to your products. This includes artwork links, print instructions, UPC codes, and vendor names. Using metadata ensures that all necessary details are included when an order is sent to a fulfillment provider like Spoke Custom.

1. Configure Your Liftoff Integration

To add the Liftoff integration to your Order Desk account, follow these steps: In the left navigation, click on Manage Integrations, search for Liftoff, and click the Enable button.

Order Desk Manage Integrations

You'll be asked for your Liftoff Account Code and API Key. Every store in Liftoff has an account code; to find it, in the left navigation click on All Accounts. You can find your admin user's API key by clicking on your name in the top navigation of Liftoff, navigating to your Profile, and then clicking on API settings.

Adding login credentials to Liftoff integration
Once connected, you'll be able to configure some integration settings. Most of these settings are self-explanatory, but we'll call your attention to a few:

Orders to Download
You'll likely want to set this to In Process. That way, orders don't flow into Order Desk until they are actually submitted by the customer.

Sync Tracking Numbers
Enable this if you want tracking numbers from Spoke Custom to automatically be pushed back up to Liftoff, triggering your shipping notification emails to your customers.
Liftoff integration settings in Order Desk
You'll probably want to only download orders that are In Process. You may also want to sync tracking numbers.
At this point, you can import Liftoff orders if you'd like to see how they will appear in Order Desk. But we'll take a deeper look at this when we set up our Order Desk rules later in this post.

2. Configure Your Spoke Custom Integration

To integrate Spoke Custom, navigate to Manage Integrations, search for Spoke, and click Enable. Enter your Spoke Custom API credentials (contact Spoke Custom for these). Copy the URL at the top and send it to your contact at Spoke for tracking information.

Entering Spoke integration credentials
Ask your contact at Spoke Custom for your API credentials.

There are quite a bit more configuration settings available for Spoke Custom. For demonstration, we'll leave these at their defaults. If you decide to use this integration for a live store, definitely review what each of these do here, and consult with Spoke Custom and/or Order Desk if you have any questions about them.

3. Set Up Vendor and Product in Liftoff

With Liftoff and Spoke Custom integrated in Order Desk, the next step is configuring settings in Liftoff. Our goal is to avoid duplicating product data in Order Desk by leveraging Liftoff's capabilities.

Set Up Vendor and Fulfillment Workflow for Spoke Custom
Log into the Liftoff admin interface and navigate to Products > Vendors and add a new vendor. You can name it "Spoke Custom". For more information on vendor creation and settings, refer to Liftoff's documentation on Vendors. You do not need to configure an integration for this new vendor.
Liftoff Add Vendor

Now that the Spoke Custom vendor is created, let's assign them to a Fulfillment Workflow by navigating to Products > Fulfillment Workflows. You can name the workflow "Spoke Custom" and then select your new Spoke Custom vendor as the Default Workflow Vendor.

Liftoff add fulfillment workflow
Set Up Product Classification and Custom Product Fields
Product classifications provide a means for establishing different types of products in Liftoff. One benefit that product classifications provide is they can be configured to show custom product fields for the types of products that need them. Create a new product classification for Spoke Custom products by navigating to Products > Product Classifications.
Next, navigate to Products > Custom Fields and choose your Spoke product classification from the dropdown. Now add a new custom field with "print_sku" as the field name. When setting up POD products in Order Desk, the print_sku identifies the product that your POD vendor will be fulfilling.
Adding the custom field in Liftoff
Set Up Your Product
In this demonstration, we're going to set up a mug for PromoPilot. You'll set this product up like most other products, but we'll point out the important parts for our project below:
A mug on a storefront
Cool virtual image, huh? I made it using Adobe Illustrator's new mockups feature. See the demo at https://youtu.be/dYS6eoDESS8
Product Classification
Set the product classification to the one we set up for Spoke products earlier. This will make it so that when we add our custom field values, the print_sku field will be visible to us.

Fulfillment Workflow
Set the fulfillment workflow for this item to Spoke Custom, the fulfillment workflow that we set up earlier. This is important because, in Order Desk, we'll create a rule based on this product coming from this vendor.

Product Files
Upload your production-ready artwork file here. Be sure to work with your Spoke Custom contact to make sure your artwork is setup correctly.
Uploaded file to Liftoff product
Custom Fields
Because we set our product classification for this item to the Spoke Custom classification that we configured earlier, we're now able to enter a SKU into our product_sku field. Spoke Custom has a wide variety of POD products available. For this example, we're choosing the 15oz white mug, SKU SP20002, which we'll enter into this field.
Add custom field value in Liftoff
Holy smokes, you guys! We're almost done. If you were to place an order for this mug and import it into Order Desk, here's what it would look like.
Imported Liftoff Order in Order Desk
You'll note in the image above some familiar and important values, including the value for our custom field, the name of the art file, and the item's origin name (vendor). Let's use this metadata to build our rules so that the next time an order for this mug is placed, Order Desk will automatically route it to Spoke.

Story Time! β€“  As I was beginning my exploration of Order Desk and their Liftoff integration, many of the data above were not included in imported orders. But if they were, then we could fully automate POD orders without needing to set up the same products in Order Desk's inventory.


So I reached out to their support team to ask if that would be possible. You guys! – they added support for all of the above in just a few days! Their support team was responsive, knew exactly what I was trying to do, and were quick to recognize the value and release a new version of the Liftoff integration that had exactly what we need to do this.

I was so juiced about this, I emailed a new contact over there to gush over how excellent the experience had been. I hope you can experience the same. πŸ˜ƒ


4. Set Up Order Desk Rules

Order Desk's powerful rules engine allows us to create two types of rules: Item Rules, which act on specific line items, and Order Rules, which act on the entire order. Our first rule needs to set some item metadata so that Spoke knows which where the print file for the product can be downloaded, and what SKU to print the artwork on to.

Set Up Item Rule
In Order Desk navigate to the Rules Builder and add a new rule. Select Item Rule and choose Order Is Imported as the trigger. Next, we want to add a filter to this rule so that it only triggers when a line item's vendor (also known as origin name), is "Spoke Custom". To do that choose Item Metadata from the dropdown, then enter the metadata's field name, liftoff_origin_name, choose Equals from the next dropdown menu, and finally enter Spoke Custom as the value. The rule will only trigger if the item is identified as a Spoke Custom item.

Our Item rule now needs a couple of actions, the first of which will tell Spoke where our artwork file is. Order Desk has a standardized method for working with its POD partners that you can learn more about here. To tell Spoke where our artwork file is, we need to define a new item metadata field called "print_url".

To do this, create a new action and choose Set Order Item Metadata from the dropdown. For the field name enter print_url.

The field's value needs to be set to the complete URL to our artwork file at Liftoff. But we don't have a full URL; all we have is the file name. Fortunately, Order Desk upgraded their Liftoff integration to also bring in our Liftoff store's primary URL as order metadata. We can combine the two values into one proper URL by entering the following into the Field Name field:

{{ "https://" ~ order.order_metadata['liftoff_account_domain'] ~ "/files/products/" ~ metadata['liftoff_product_variant_file_1'] }}

This funny looking bit of text is a technology called Twig that Order Desk uses for its templating engine. It can also be used to combine values. If you look closely, you might begin to see how this formula combines all of the parts of the URL we need, including the Liftoff account's primary URL and the name of the file we uploaded to this product in Liftoff.

Now we need to create a new print_sku metadata field for the line item. Yes, we already have that value from Liftoff. All we need to do is create another action to Set Order Item Metadata for field name print_sku with the value below:

{{ metadata['liftoff_print_sku'] }}

Your completed rule should look like the image below.
Completed rule in Order Desk
It's a breeze from here. Promise. You're doing great! πŸ’ͺ
Give your rule a name and click save.

Set Up Order Rule
Our final rule will simply send the order for the mug to Spoke Custom for fulfillment. If you are planning on introducing POD to your own Liftoff program, you would likely want to create a rule to split the order based on the line item's vendor or other factors, which Order Desk is totally capable of. But for this demonstration, we'll simply assume that all orders are for Spoke, and so our rule set puts all the item data in the right place and sends the order on to Spoke. Here's how we do it.

Create a new Order Rule beneath the item rule you just created. Orders are run in the order that they appear in the Rules Builder. Set the order to trigger when the order is imported. For the action, choose Submit Order to Spoke Custom from the dropdown. Give the rule a name and save. Done. Your Order Rule should look like the image below.
Order Desk Rule

Turn your rules on and brace yourself for something... magical. ✨

5. Place A Test Order!

Run over to Liftoff and order your mug! Then skip over to Order Desk. Your order may already appear in the Prepared folder, which, if you kept the default values when configuring your Spoke Custom integration, it is placed into automatically after being sent to Spoke.

Let's look at a couple of things to help you understand how this works. First, expand the item metadata under the mug and you will see two new metadata fields, print_url and print_sku. These are the fruits of the Item Rule that we set up.
item metadata
Now scroll down to view the Order History. You should see that the order has been submitted to Spoke Custom. That is the work of the Order Rule that we set up. In a few minutes, if you refresh the page, you will see that Spoke Custom has received the order. 
order history
At this point, you may want to cancel the order you just placed so that Spoke doesn't charge you for the item. Serendipitously, as we were creating this content, Spoke and Order Desk released an update to their integration. This update adds a black button on the order page, allowing you to cancel the order with Spoke if it has not yet gone to production. Very cool!
cancel order button

Conclusion

Phew! This was the longest write up I've done so far at PromoPilot. But it was worth it. I've had an absolute blast getting to know Order Desk over the last few weeks, and I've barely scratched the surface. Order Desk has many more powerful and time-saving features. We're hoping to share more of that with you in the future.

In the meantime, I hope you found this tutorial to be helpful or that it inspired you to check out Order Desk for yourself. If you do, please let them know PromoPilot sent you. 😊
Eric Granata

Eric Granata

Managing Director PromoPilot, LLC

Eric Granata is the Managing Director of PromoPilot, an automation consultancy firm serving the promotional products and printing industry.