Overview
The 99minds integration provides a set of ready-made functions you can call when building mappings. They handle common lookups and conversions for 99minds, such as finding or validating a customer by email, resolving a customer from a loyalty card, summarizing or listing loyalty card transactions, mapping a VIP tier to iPaaS.com customer categories, and reading custom field values, 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 99minds 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 GetCustomerIdByEmail(emailAddress).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 withawait; the rest are synchronous and are called directly. Each function's How to call it example shows the correct form.Optional parameters are marked in the parameter table, along with the value used when you omit them.
Each function runs at sync time, against the data in your connected 99minds account and your iPaaS.com subscription.
The functions are grouped below by the area of the integration they support.
Customers and Tiers
Use these to resolve 99minds customers and map their VIP tiers during customer mapping.
GetCustomerIdByEmail
What it does: Looks up a 99minds customer by email address and returns the 99minds customer ID. Returns nothing if no customer matches or the email is empty.
Signature: Task<string> GetCustomerIdByEmail(object emailAddress)
How to call it: await GetCustomerIdByEmail(emailAddress)
Parameter | Type | Required | Default | Description |
emailAddress |
| Yes | N/A | The iPaaS.com customer email address to search 99minds by. |
Returns: string. The 99minds customer ID, or nothing if no customer matches.
Example: await GetCustomerIdByEmail("john.doe@example.com") returns the 99minds customer ID for that email.
When to use it: When mapping a record to a 99minds customer and you have the customer's email but need the 99minds customer ID.
ValidateCustomerEmail
What it does: Checks whether a customer with the given email exists in 99minds. Returns the email address if a matching customer is found, or nothing if not. This prevents a new 99minds customer from being created from an email alone.
Signature: Task<string> ValidateCustomerEmail(object emailAddress)
How to call it: await ValidateCustomerEmail(emailAddress)
Parameter | Type | Required | Default | Description |
emailAddress |
| Yes | N/A | The iPaaS.com customer email address to validate against 99minds. |
Returns: string. The email address if a matching 99minds customer exists, or nothing if not.
Example: await ValidateCustomerEmail("john.doe@example.com") returns the email when a matching 99minds customer exists, otherwise nothing.
When to use it: When a gift card should only be associated with a customer that already exists in 99minds, to avoid creating a new customer record from an email.
GetCustomerId
What it does: Resolves the iPaaS.com customer ID from a 99minds loyalty card, by reading the card's customer and mapping it to iPaaS.com. Returns nothing if the card or mapping is not found.
Signature: Task<string> GetCustomerId(object CardId)
How to call it: await GetCustomerId(CardId)
Parameter | Type | Required | Default | Description |
CardId |
| Yes | N/A | The 99minds loyalty card identifier. |
Returns: string. The iPaaS.com customer ID, or nothing if no match is found.
Example: await GetCustomerId("LC-12345") returns the iPaaS.com customer ID linked to that loyalty card.
When to use it: When mapping a loyalty card to its iPaaS.com customer.
Convert99MindsTierToiPaaSCategories
What it does: Builds the full set of iPaaS.com customer categories for a 99minds customer: it keeps the customer's existing iPaaS.com categories that are not tied to a 99minds tier, then adds the iPaaS.com category that the given 99minds VIP tier maps to. Returns nothing if the customer ID is empty.
Signature: Task<object> Convert99MindsTierToiPaaSCategories(string customerId, string tierId)
How to call it: await Convert99MindsTierToiPaaSCategories(customerId, tierId)
Parameter | Type | Required | Default | Description |
customerId |
| Yes | N/A | The 99minds customer ID whose existing iPaaS.com categories should be preserved. |
tierId |
| Yes | N/A | The 99minds VIP tier ID to map to an iPaaS.com customer category. |
Returns: object. A list of iPaaS.com customer categories: the preserved categories plus the category mapped from the tier. Returns the preserved categories even when the tier has no mapping, or an empty list when there are none.
Example: await Convert99MindsTierToiPaaSCategories("cust_12345", "tier_b0ececccf41f5ab6fd") returns the customer's iPaaS.com categories including the one mapped from the VIP tier.
When to use it: When syncing a 99minds customer's VIP tier into iPaaS.com customer categories without losing their other categories.
Transactions
Use these to summarize or resolve loyalty card transactions during mapping.
GetAllTransactionAmountOfOrderId
What it does: Calculates the net loyalty transaction total for an order on a 99minds loyalty card. It adds each transaction amount, subtracting manual debits, expirations, and redemptions. Returns nothing if the transaction has no card or order ID, or no transactions are found.
Signature: Task<double?> GetAllTransactionAmountOfOrderId(Transaction transaction)
How to call it: await GetAllTransactionAmountOfOrderId(transaction)
Parameter | Type | Required | Default | Description |
transaction |
| Yes | N/A | The iPaaS.com transaction. It must carry the 99minds loyalty card ID and client order ID (the customer ID is used only for logging). |
Returns: double?. The net transaction total, or nothing if there is no card or order ID, or no transactions.
Example: For a card with a "PURCHASE" of 100, a "REDEMPTION" of 40, and a "BONUS" of 10, await GetAllTransactionAmountOfOrderId(transaction) returns 70.
When to use it: When mapping the net loyalty amount for an order to iPaaS.com.
GetTransactionListForCard
What it does: Returns the loyalty transactions for a 99minds card as a delimited string, optionally filtered to one client order. Each entry is TransactionId|TransactionType|TransactionAmount, joined with commas. Returns nothing if the card ID is empty or no transactions are found.
Signature: Task<string?> GetTransactionListForCard(string card_id, string client_order_id = "")
How to call it: await GetTransactionListForCard(card_id)
Parameter | Type | Required | Default | Description |
card_id |
| Yes | N/A | The 99minds loyalty card identifier whose transactions to retrieve. |
client_order_id |
| No |
| An optional client order ID to filter the transactions. When omitted, all transactions for the card are returned. |
Returns: string?. A comma-separated list of TransactionId|TransactionType|TransactionAmount entries, an empty string if the card has none, or nothing if the card ID is empty.
Example: await GetTransactionListForCard("LC-12345", "ORD-789") returns a value such as "TX-1001|PURCHASE|100,TX-1002|REDEMPTION|40".
When to use it: When mapping a card's loyalty transaction history into a single value.
IpaasTransactionIdByNumber
What it does: Looks up an iPaaS.com transaction by its client order ID and returns the iPaaS.com transaction ID. Returns nothing if no transaction matches.
Signature: Task<string?> IpaasTransactionIdByNumber(string clientOrderId)
How to call it: await IpaasTransactionIdByNumber(clientOrderId)
Parameter | Type | Required | Default | Description |
clientOrderId |
| Yes | N/A | The client order ID to look up in iPaaS.com transactions. |
Returns: string?. The iPaaS.com transaction ID, or nothing if no transaction matches.
Example: await IpaasTransactionIdByNumber("ORD12345") returns the iPaaS.com transaction ID for that client order.
When to use it: When you have a client order ID and need the matching iPaaS.com transaction ID.
Custom Fields
Use these to read custom field values from a record during mapping.
GetPropertiesFromCustomFields
What it does: Reads custom field values from a custom fields object. With a field name, it returns that single field's value; without one, it returns all valid custom fields as a set of name/value pairs. Field names are matched loosely, ignoring case and punctuation. Fields whose name contains list_, and the subscribeprofile field, are skipped.
Signature: object GetPropertiesFromCustomFields(object customFieldObj = null, string customFieldName = null)
How to call it: GetPropertiesFromCustomFields(customFieldObj, customFieldName)
Parameter | Type | Required | Default | Description |
customFieldObj |
| No |
| The custom fields to read (a list of entries, each with a name and value). Returns nothing when omitted. |
customFieldName |
| No |
| The name of a single custom field to return. When omitted, all valid custom fields are returned. Case and punctuation are ignored. |
Returns: object. The requested field's value when a name is given, or all valid custom fields as name/value pairs when it is not; nothing if the input is empty or has no valid fields.
Example: GetPropertiesFromCustomFields(customFieldObj, "FirstName") returns "John" for a field named FirstName.
When to use it: When mapping a value out of a record's custom fields, or reading all custom fields at once.
CreateDictionaryFromCustomFields
What it does: Converts a custom fields object into a set of name/value pairs, keeping only entries whose name and value are both present. Returns nothing if the input is empty or has no valid fields.
Signature: Dictionary<string, string> CreateDictionaryFromCustomFields(object customFieldObj)
How to call it: CreateDictionaryFromCustomFields(customFieldObj)
Parameter | Type | Required | Default | Description |
customFieldObj |
| Yes | N/A | The custom fields to convert (a list of entries, each with a name and value). |
Returns: Dictionary<string, string>. The custom fields as name/value pairs, or nothing if the input is empty or has no valid fields.
Example: CreateDictionaryFromCustomFields(customFieldObj) returns a set of pairs such as Email = "john.doe@example.com" and Phone = "+123456789".
When to use it: When you need all of a record's custom fields as name/value pairs for further mapping.
