MYOB icon

MYOB

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

Actions12

Overview

This node interacts with the MYOB Business API to manage Sales Orders, specifically allowing you to retrieve the unique identifier (UID) of a sales order by searching for its Purchase Order Number. This is useful in scenarios where you have an external purchase order reference (such as a Shopify order number) and need to find the corresponding sales order UID within MYOB for further processing or integration tasks.

For example, if you receive a webhook from Shopify containing a purchase order number, you can use this node operation to look up the matching sales order UID in MYOB, enabling you to update or query that order in subsequent workflow steps.

Properties

Name Meaning
Purchase Order Number The Purchase Order Number to search for (e.g., Shopify order number). The node automatically removes any leading # prefix if present. Example inputs: #1234 or 1234. This property is required.

Output

The output JSON contains information about the search result for the sales order UID based on the provided Purchase Order Number:

  • searchedFor: The sanitized purchase order number used in the search.
  • found: Boolean indicating whether a matching sales order was found.
  • uid: The UID of the found sales order (empty string if not found).
  • message: A descriptive message about the search outcome (success, info, or error).
  • salesOrder: The full sales order object returned by MYOB when found.
  • totalResults: Number of matching sales orders found (usually 0 or 1).
  • fullResponse: The complete raw response from the MYOB API.

If no matching order is found, the output will indicate this with found: false and an informative message.

Dependencies

  • Requires an active connection to the MYOB Business API using OAuth2 authentication.
  • The node expects valid credentials configured in n8n for accessing the MYOB API.
  • The company file GUID must be available from the credentials to construct API requests.

Troubleshooting

  • Empty Purchase Order Number: If the Purchase Order Number input is empty or only whitespace, the node throws an error stating that this parameter cannot be empty.
  • No Matching Order Found: If no sales order matches the given purchase order number, the node returns a message indicating no match rather than throwing an error.
  • Invalid API Response: If the MYOB API returns an invalid or empty response, the node outputs an error message including the raw response for debugging.
  • API Connectivity Issues: Errors related to authentication or network issues will cause the node to throw exceptions. Ensure your MYOB API credentials are correctly set up and have necessary permissions.

Links and References

Discussion