Raw Message Contents Reference for WooCommerce Connector

In general, Raw Message Content settings are used by workflow triggers to define how to process data fetched from a system. This converts data from one format (such as csv or json) into Saltbox Message format (XML) so it can be processed by the workflow.

Refer to the instructions below for examples with walkthroughs.

WooCommerce Connector triggers utilize the following message formats:

Message Format Description Version
WooCommerce Handle WooCommerce’s message format. 1.0+
WooCommerce Converter - Split options Handle WooCommerce’s message format. Use advanced options to split data into multiple messages. 1.1+

Message Formats

WooCommerce

Message Format Description Version
WooCommerce Handle WooCommerce’s message format. 1.0+

This is the default option for most WooCommerce trigger sources. If you need to split data, for example if you need to split an order’s lines into separate messages, use WooCommerce Converter - Split options.

WooCommerce Converter - Split options

Message Format Description Version
WooCommerce Converter - Split options Handle WooCommerce’s message format. Use advanced options to split data into multiple messages. 1.1+

To split data into multiple messages, you must first know the XPath to the list of data that will be split apart. This can be found by inspecting the trigger’s source data. A walkthrough of this process is found below.

For example, using the WooCommerce Order Message Source, the workflow may want to process individual lines as separate messages instead of one single order. To split order lines, set XPath to contained messages to: /WooCommerce/items/line_items.

A walkthrough is provided below which outlines in detail How to find an XPath in Trigger source data

How to find an XPath in Trigger source data

When a single source message contains multiple data points that need to be processed (for example, an order may be split into multiple lines, or a customer may be split into multiple contacts), they may be split using advanced Raw Message Contents settings. To find the desired “XPath to contained messages”, use the process outlined below to generate the trigger data source and inspect it.

  1. Open a workflow whose trigger is already configured. To set up a new workflow trigger, watch our 2-minute video tutorial: Workflow Trigger Setup.

  2. Open Workflow Designer.

  3. Add the “Assert” workflow action from the Core Connector. Place this as the first action in the workflow.

  4. Configure the Assert action to fail. The goal is to force the workflow to fail so that we generate the data but don’t process it yet. This can be re-processed at a later time on the Messages page using the “retry” option.

    To configure the Assert action to fail:

    • Edit the action.

    • Assign the following values. This will force the workflow to fail at the beginning, which will allow a user to save/inspect the data generated by the trigger.

    • Click away from the settings.

    • Press the Save button.

    • Run the workflow to generate a message. This will fail (on purpose).

    • After running the workflow:

      • Drill into the failed message trace.

      • Expand the status bar at the top.

      • Click on the link to open the Trigger Message XML. From here, you may press the Save button to save a copy to the samples folder for future reference.

      • Search the XML for the desired data. Build the path to this data by inspecting each parent node containing the data. For example: /BOM/BO/Document_Lines/row/ points to the SAP Business One document’s lines array.

        This XPath can be used to split messages by pasting it into the XPath to contained messages field.