MYOB icon

MYOB

Interact with MYOB Business API - Sales Orders, Customers, Items, Invoices, and more

Actions12

Overview

This node operation updates an existing MYOB Sales Order with data from a Shopify order, specifically syncing line items and shipping details. It is useful for businesses that use Shopify for e-commerce and MYOB for accounting and inventory management, enabling automated synchronization of sales orders between the two systems.

Typical scenarios include:

  • Updating MYOB sales orders when Shopify orders are modified or confirmed.
  • Adding or adjusting line items in MYOB based on Shopify's order line items.
  • Including shipping charges as separate line items in MYOB with appropriate tax codes.
  • Keeping purchase order numbers, comments, and internal journal memos up to date in MYOB.

Example: After receiving a Shopify order webhook, this node can update the corresponding MYOB sales order by matching SKUs, quantities, prices, and adding shipping lines if applicable.

Properties

Name Meaning
MYOB Order UID The unique identifier of the MYOB Sales Order to update.
Shopify Update Data JSON array of Shopify line items (e.g., from Shopify webhook line_items field) to sync into MYOB.
Default Product UID MYOB Product UID used when no SKU match is found in Shopify line items.
Shipping SKU SKU for the shipping line item (optional). If empty, no shipping line is added.
Shipping Description Description text for the shipping line item (e.g., "Standard Shipping").
Shipping Price Price amount for the shipping line item.
Freight Tax Code UID Tax code UID for freight/shipping charges; optional, defaults to GST if not provided.
Purchase Order Number Optional updated purchase order number; leave empty to keep existing value.
Comment Optional comment text for the sales order; leave empty to keep existing value.
Journal Memo Optional internal journal memo; leave empty to keep existing value.
Default Tax Code UID Default tax code UID applied to all line items if no specific tax code is found (required).
Default Location UID Default location UID for inventoried items (usually main warehouse/store) (required).

Output

The output JSON contains the result of the update operation with fields such as:

  • success: Boolean indicating if the update was successful.
  • message: A descriptive message about the update status.
  • myobOrderUid: The UID of the updated MYOB sales order.
  • processedLineItems: Number of line items processed and updated.
  • shippingAdded: Boolean indicating if a shipping line item was added.
  • shippingPrice: The price of the shipping line item added.
  • apiResponse: The full response object returned from the MYOB API after the update.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to the MYOB Business API authenticated via OAuth2.
  • Needs the company file GUID from MYOB credentials to construct API requests.
  • Uses MYOB API endpoints to fetch and update sales orders and inventory items.
  • Requires valid UIDs for products, tax codes, and locations configured in MYOB.

Troubleshooting

  • Invalid JSON in Shopify Update Data: If the Shopify line items JSON is malformed, the node will throw an error. Ensure the JSON is correctly formatted.
  • Missing Required Fields: Errors occur if required properties like MYOB Order UID, Default Product UID, Default Tax Code UID, or Default Location UID are missing.
  • SKU Lookup Failures: If a SKU from Shopify cannot be matched to a MYOB product, the default product UID is used instead. Warnings are logged but do not stop execution.
  • Shipping SKU Not Found: If the shipping SKU does not exist in MYOB inventory, the shipping line item is skipped with a warning.
  • MYOB Order Not Found: If the specified MYOB sales order UID does not exist, an error is thrown.
  • API Response Issues: Unexpected or empty responses from MYOB API may cause errors; verify API connectivity and permissions.

Links and References

Discussion