Skip to main content

ShipHero Mapping Functions

Reference for the ShipHero-specific functions you can use in Dynamic Formula mappings and mapping collection filters.

Overview

The ShipHero integration provides a set of ready-made functions you can call when building mappings. They handle common lookups and conversions against ShipHero and your iPaaS.com data, such as resolving a location or product by name or SKU and encoding a warehouse identifier into the form ShipHero's API expects, so you do not have to write that logic yourself in a formula.

Where you can use these functions

These functions are available anywhere you write a formula for the ShipHero integration:

  • Dynamic Formula mappings: where a destination field's value is produced by a formula rather than mapped directly from a source field.

  • Mapping collection filters: where a formula decides whether a record should be processed.

  • Error filters: a mapping collection's error filter, which sits alongside its collection filter. When the error filter's formula resolves to true, the transfer raises an error that is held in the Error Logs for review and is not retried automatically.

  • Translation collections: where a translation entry uses a formula as its source value.

How to use them

  • Call a function by name and pass the values it needs in parentheses, for example: await GetiPaaSProductIdBySkuAsync(SourceSku).

  • Each function's signature shows its name, the parameters it accepts (with their types), and the type of value it returns. Use it as the reference for exactly how to call the function.

  • Function names and formula syntax are case-sensitive, so type each name exactly as shown. Whether the values a function matches are treated as case-sensitive varies by function, and is called out in the relevant parameter's description.

  • Some of these functions are asynchronous (their signature returns a Task) and must be called with await; the rest are synchronous and are called directly. Each function's How to call it example shows the correct form.

  • Each function runs at sync time, against the data in your connected ShipHero account and your iPaaS.com subscription.

The functions are grouped below by the area of the integration they support.

Products

GetiPaaSProductIdBySkuAsync

What it does: Looks up an iPaaS.com product by its SKU and returns the product's iPaaS.com ID.

Signature: Task<long> GetiPaaSProductIdBySkuAsync(object sku)

How to call it: await GetiPaaSProductIdBySkuAsync(sku)

Parameter

Type

Required

Default

Description

sku

object

Yes

N/A

The iPaaS.com product SKU to look up. Typically a string, but any value convertible to a string is accepted.

Returns: long. The iPaaS.com product ID, or 0 if no product matches the SKU.

Example: "SKU-12345" returns the iPaaS.com product ID for that SKU.

When to use it: Use this when a mapping needs the iPaaS.com product ID and you have only the product SKU, for example when linking a ShipHero record back to its iPaaS.com product.

GetiPaaSProductVariantIdBySkuAsync

What it does: Looks up an iPaaS.com product variant by its SKU and returns the variant's iPaaS.com ID.

Signature: Task<long> GetiPaaSProductVariantIdBySkuAsync(object sku)

How to call it: await GetiPaaSProductVariantIdBySkuAsync(sku)

Parameter

Type

Required

Default

Description

sku

object

Yes

N/A

The iPaaS.com product variant SKU to look up. Typically a string, but any value convertible to a string is accepted.

Returns: long. The iPaaS.com product variant ID, or 0 if no variant matches the SKU.

Example: "SKU-12345" returns the iPaaS.com product variant ID for that SKU.

When to use it: Use this when a mapping needs the iPaaS.com product variant ID and you have only the variant SKU.

Locations and Warehouses

DoesIpaasLocationExistByNameAsync

What it does: Checks whether an iPaaS.com location with the given name exists.

Signature: Task<bool> DoesIpaasLocationExistByNameAsync(object locationName)

How to call it: await DoesIpaasLocationExistByNameAsync(locationName)

Parameter

Type

Required

Default

Description

locationName

object

Yes

N/A

The name of the iPaaS.com location to look for. Typically a string, but any value convertible to a string is accepted.

Returns: bool. true if a location with that name exists in iPaaS.com; otherwise false.

Example: "Primary" returns true when an iPaaS.com location named Primary exists.

When to use it: Use this in a filter to confirm a location exists in iPaaS.com before running a mapping that depends on a valid location, such as inventory allocation or fulfillment.

GetiPaaSLocationIdByNameAsync

What it does: Looks up an iPaaS.com location by name and returns its iPaaS.com ID.

Signature: Task<string> GetiPaaSLocationIdByNameAsync(object locationName)

How to call it: await GetiPaaSLocationIdByNameAsync(locationName)

Parameter

Type

Required

Default

Description

locationName

object

Yes

N/A

The name of the iPaaS.com location to search for. Typically a string, but any value convertible to a string is accepted.

Returns: string. The iPaaS.com location ID, or null if no location matches the name.

Example: "Primary" returns the iPaaS.com location ID for the location named Primary.

When to use it: Use this to turn a location name into its iPaaS.com ID for a downstream mapping that requires the explicit location identifier.

GetEncodedWarehouseID

What it does: Encodes a ShipHero warehouse identifier into the Base64 global ID format that ShipHero's API uses. It prefixes the identifier with Warehouse: and Base64-encodes the result.

Signature: string GetEncodedWarehouseID(string warehouseId)

How to call it: GetEncodedWarehouseID(warehouseId)

Parameter

Type

Required

Default

Description

warehouseId

string

Yes

N/A

The ShipHero warehouse identifier to encode. If it is null, empty, or whitespace, the function returns an empty string.

Returns: string. The Base64-encoded ShipHero warehouse global ID, or an empty string when no identifier is supplied.

Example: "WH12345" returns the Base64 encoding of Warehouse:WH12345.

When to use it: Use this when a mapping to ShipHero needs a warehouse referenced by its encoded global ID rather than its plain identifier.

Shipping

FindShippingMethodFromName

What it does: Searches iPaaS.com shipping methods for the given ShipHero shipping method name and returns the matched iPaaS.com shipping method name when one is found.

Signature: Task<string> FindShippingMethodFromName(string name)

How to call it: await FindShippingMethodFromName(name)

Parameter

Type

Required

Default

Description

name

string

Yes

N/A

The ShipHero shipping method (carrier) name to match against iPaaS.com shipping methods.

Returns: string. The matched iPaaS.com shipping method name, or null if no shipping method matches.

Example: "Manually Fulfilled" returns the matching iPaaS.com shipping method name when one exists.

When to use it: Use this in a mapping or filter to confirm or translate a ShipHero shipping method name to its iPaaS.com equivalent.

Related Documents

Did this answer your question?