Overview
The Shippo integration provides a ready-made function you can call when building mappings. It handles a common lookup between Shippo and iPaaS.com data, turning a Shippo carrier service into the name of the matching iPaaS.com shipping method, so you don't have to write that logic yourself.
Where you can use these functions
These functions are available anywhere you write a formula for the Shippo 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 GetShippoShippingMethodName(ShippingMethodId).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.
Every function that returns a
Taskis asynchronous and must be called withawait, as shown in each How to call it example.Each function runs at sync time, against the data in your connected Shippo account and your iPaaS.com subscription.
The functions are grouped below by the area of the integration they support.
Shipping Methods and Tracking
GetShippoShippingMethodName
What it does: Returns the name of the iPaaS.com shipping method linked to a Shippo carrier service. A tracking record's shipping method must be the name of a shipping method that exists in iPaaS.com, so this function reads that name from iPaaS.com through the shipping method's link to the Shippo carrier service.
Signature: Task<string> GetShippoShippingMethodName(object carrierToken)
How to call it: await GetShippoShippingMethodName(carrierToken)
Parameter | Type | Required | Default | Description |
carrierToken |
| Yes | N/A | The Shippo carrier service, written as the carrier and its service level separated by a pipe, for example usps|usps_priority. On a Shippo label this is the label's ShippingMethodId field. Spaces around the value are ignored. |
Returns: string. The name of the iPaaS.com shipping method linked to that Shippo carrier service, or null when the value passed is blank or that carrier service hasn't reached iPaaS.com yet.
Example: return await GetShippoShippingMethodName(ShippingMethodId); returns USPS Priority Mail.
When to use it: On the tracking collection TO iPaaS.com, to fill the tracking record's ShippingMethod (the default Label template's mapping uses it this way). The function makes up to two iPaaS.com lookups per carrier service and keeps the answer for 60 seconds, so many labels for the same service are looked up once. It doesn't raise an error: when it returns null, check that the shipping method has come TO iPaaS.com from this subscription (run the shipping method initialization during setup).
