By default the Shipping Method is pulled from the shipping_description field in the data located via the path: order.shipping_description.
In order to change the path used to get the Shipping Method, you will need to enter a new path to direct Shiptheory to where it can find this data in your shipments or orders.
Path Syntax
The Shipping Method path uses dot notation to dictate how to navigate through the JSON data Shiptheory downloads from Adobe Commerce when processing your orders and shipments.
For example:
order.base_currency_code |
Would extract "GBP" from the order data below:
- Depending on where you have chosen to get your shipping method from, the path can guide Shiptheory to download the message from either your Adobe Commerce order or shipment data. As such, the path should always start with the word "order" or "shipment".
- The path is Case Sensitive. For example, "name" will match "name" but not "Name" or "NAME".
- {n} can be used to match any unordered elements, such as multiple line items or notes.
- If multiple matches can be made, only the first match is returned.
- If you need to match an element where an attribute matches a certain value, you can add a match condition to the path in square brackets. For example, if you had an unordered list of products and you wanted to return the name of a product with a certain SKU, you could use something like the example below:
order.items.{n}[sku=AB123].name
Data Path testing tool
We have a tool to help you build and test your data path, available here: https://helm.shiptheory.com/sandbox/find_data_path.
Simply copy-and-paste the JSON data from a Adobe Commerce order or shipment into the tool and you will be able to enter and test your data path before saving to your Adobe Commerce settings.
More examples
Returns: This is an order noteorder.note
Since this has multiple matches (Note A and Note B), the first match is returnedorder.extension_attributes.notes.{n}.value
Returns: Note A
Returns: Blue T-Shirtorder.items.{n}[sku=tshirt-b].name
If you have any questions regarding this or anything else, please don't hesitate to get in touch with the Shiptheory support team!