Magento Lookup Configuration

Version 23.2.8630


Magento Lookup Configuration


The Lookup action retrieves a value from Magento and inserts that value into an existing Arc message in the flow.

Lookup Query

Follow these steps to configure a Lookup query for the Magento connector:

  1. In the CData Arc flow, drag an arrow from the connector that will provide input to the connector.

  2. Under Destination Type, select XPath to insert the query response values into an XML file or Header to insert the query response value into a message header.

  3. Provide the Destination for the query response values:
    • XPath: Enter the XPath value to the desired destination in the XML file. For example, /Items/Invoices/Customer.
    • Header: Enter the name of the new message header for the data.
  4. In the Lookup Query, enter the SQL query to retrieve data from Magento tables.
    • XPath: Format the path as ${XPATH:/path/to/element}. For example, SELECT CustomerID FROM Customers WHERE CustomerName = ${XPATH:/Items/Invoices/Customer}.
    • Header: Format the path as ${HEADER:HeaderName}.
  5. If the query you entered could return multiple values, check Use first result to avoid errors.

  6. Set Value Not Found Action to the desired behavior for values that cannot be found.

  7. In the Arc flow, drag an arrow from the Magento connector to the connector where you want your resulting XML or Header data to go.

Cache

The Magento connector can perform Lookup queries against a local cache instead of querying Magento directly for each Lookup. This can improve query performance, especially with larger databases.

To enable this feature, check the Enable Lookup Cache checkbox in the Advanced Settings portion of the Advanced tab and configure the rest of the fields as needed. If a query returns no results from the cache, the connector then queries Magento directly.

Note: If your query statement contains a limit, offset, or groupby parameter, the cache function does not work. These queries go directly to Magento.