Order Submission
Order submission is a highly environment specific process. For E-commerce platforms that we support we can simplify the process. For custom integrations you will need to do some work yourself.
E-commerce Platforms
For E-commerce platforms that we support we have a number of plugins that will automatically handle the order submission process for you.
Shopify
The shopify plugin will automatically submit orders to our platform when they are placed. This is the recommended way to integrate with shopify. You can continue to manage orders within Shopify as you normally would, you just need to make sure that you have annotated the line item representing the product with the transaction ID of the workflow experience that was completed. by the customer.
When submitting a line item to Shopify you'll want to include the following property to a line item add.js call:
{
...
"properties": {
"spiffTransactionId": "1234-5678-9012-3456"
}
...
}
Many partners don't like this ID showing up in the cart. You can usually hide it with most themes by prefixing an underscore to the property name as follows.
{
...
"properties": {
"_spiffTransactionId": "1234-5678-9012-3456"
}
...
}
You can obtain the transaction ID from the transaction object.
const transactionId = experience.getWorkflowManager().getTransaction().id;
If you're using bundles you have two options. You can either submit one line item with the bundle ID or one line item for each product in the bundle. The latter is the recommended approach as it allows you to track each product individually. To submit a line item with a bundle ID see the following example
const bundleId = bundle.getId();
{
...
"properties": {
"spiffBundleId": "1234-5678-9012-3456"
}
...
}
The property may be hidden in the same way as the transaction ID.
Once an order is placed containing a line item we will handle the rest, firing off any automation associated to the contained products and posting information about the order within our hub for you to manage.