Overview
The Orderful integration provides a set of ready-made functions you can call when building mappings. They handle common lookups for Orderful and your iPaaS.com data, such as resolving a location ID and reading a value from a custom field, 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 Orderful 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 GetValueFromCustomField(CustomFields, "Color").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 Orderful account and your iPaaS.com subscription.
The functions are grouped below by the area of the integration they support.
Locations
ConvertiPaaSLocationIdToCommerceId
What it does: Maps an iPaaS.com location ID to the linked Orderful location ID.
Signature: Task<string> ConvertiPaaSLocationIdToCommerceId(object locationId)
How to call it: await ConvertiPaaSLocationIdToCommerceId(locationId)
Parameter | Type | Required | Default | Description |
|
| Yes | N/A | The iPaaS.com location ID to map, typically a string or numeric identifier. |
Returns: string. The Orderful location ID linked to the iPaaS.com location ID. If the lookup fails, the function raises an error.
Example: "LOC-98765" returns the Orderful location ID mapped from that iPaaS.com location.
When to use it: Use this when a mapping references a location by its iPaaS.com ID and you need the matching Orderful location ID.
Custom Fields
GetValueFromCustomField
What it does: Reads the value of a named custom field from a set of custom fields. The field-name match ignores case and any non-alphanumeric characters, so a name like Field-Name_01 matches fieldname01.
Signature: Task<object> GetValueFromCustomField(object customFieldObj, object textFieldName)
How to call it: await GetValueFromCustomField(customFieldObj, textFieldName)
Parameter | Type | Required | Default | Description |
|
| Yes | N/A | The object or list that holds the custom fields and their values. |
|
| Yes | N/A | The name of the custom field to read. The match ignores case and non-alphanumeric characters. |
Returns: object. The value of the matching custom field, or null if either input is null or no field matches the name.
Example: With a custom field named Color set to Red and a textFieldName of "color", the function returns "Red".
When to use it: Use this to pull a single custom-field value into a mapping by its name, without worrying about exact casing or punctuation.
