ShipStation Lookups

The ShipStation connector also allows you to lookup values from ShipStation. The CustomLookup function is very similar to the native Lookup function in IMan.

Syntax

CustomLookup(systemid, select, from, where, "", mustreturnvalue)

Arguments

  • systemid
    • The system id value of the ShipStation system connector to be used for the lookup.
  • select
    • The JPath of the field to be returned.
  • from
    • This is the name of the resource to be queried. Note this is just the resource type, it does not include the server part of the url.
  • Query String
    • This is the query string used in the query of the request being issued to ShipStation.
  • emptystring
    • This parameter is not used, just pass an empty string.
  • mustreturnvalue
    • True or False to specify the Lookup query should return one record.
    • True
      • An error will be raised if the lookup fails to return a record.
    • False
      • The function will return an empty string if the lookup fails to return a record.

Example

To check for the existence of an order in ShipStation using the order number that you wish to check.

CustomLookup("SHIPSTATION", "/orders[]/orderNumber", "orders", "orderNumber=" & %ShipStationDoc , "", False) <> ""

To return the tracking number of the first shipment using the order number.

CustomLookup("SHIPSTATION", "/shipments[]/trackingNumber", "shipments", "orderNumber=" & %ShipStationDoc , "", False) <> ""