Skip to main content

99minds from iPaaS.com Order Completed Workflow Mapping Documentation

Synchronize completed orders and return from iPaaS to 99Minds

99minds from iPaaS.com Order Completed Workflow Mapping Documentation

Completed iPaaS.com orders are sent to 99minds to trigger loyalty workflows through Manual Sync or an outbound transfer. Each qualifying order fires a 99minds workflow event — for example, awarding loyalty points on a paid order or processing a refund — carrying the order totals, quantity, and customer reference. A paid order fires the order-paid workflow; validated returns and negative totals are processed as refunds.

ID Format

Manual Sync ID Format

On the iPaaS.com Manual Sync page, enter the iPaaS.com transaction Id — for example, 159865. This is the transaction Id, not the transaction number.

External ID Format

After a successful transfer, the iPaaS.com transaction number is recorded as the external-id link. It serves as the idempotent key so the same order is not processed twice.

Deleted Record Support

Outbound delete is not supported. This collection sends completed orders to trigger 99minds loyalty workflows only; the Delete operation is not implemented, delete mappings are not included in the default template, and removing a record in iPaaS.com does not reverse a workflow in 99minds.

Mapping Collection Status

  • Status: Enabled.

  • Trigger Events: Outbound transfers fire from the iPaaS.com Outbound Data Flows the subscriber subscribes to — transaction/created, transaction/updated, transaction/deleted. Manual Sync is available at any time. No automatic transfers occur until those outbound subscriptions are enabled.

Duplicate or Conflicting Mappings

The Add 99minds Loyalty Card Transaction TO iPaaS.com and Update 99minds Loyalty Card Transaction TO iPaaS.com collections bring 99minds loyalty point activity INTO iPaaS.com, whereas this collection sends completed orders OUT to 99minds to trigger loyalty workflows. Configure the order filter here together with the loyalty-transaction collections so loyalty is not double-counted.

Collision Handling

This collection does not use collision handling. The transaction number is recorded as the idempotent key so the same order is not processed twice.

Supported Child Collections

None — this is a standalone collection with no dependent child collections.

System Caveats

99minds Caveats

  • The order triggers a 99minds workflow (such as awarding points or processing a refund); the workflow's outcome is governed by the 99minds program configuration.

iPaaS.com Caveats

  • The order must be Complete in iPaaS.com to be sent to 99minds.

  • Only orders and validated returns are processed, and transaction numbers ending in -D or -GC are excluded (see the Mapping Filter).

Integration-Specific Caveats

  • The transaction number is used as the idempotent key, so a single order can never award points or post a refund more than once.

Setup Requirements

iPaaS.com Configuration

  • Subscribe to the Transaction outbound triggers under Outbound Data Flows that should send completed orders to 99minds: transaction/created, transaction/updated, transaction/deleted.

  • For loyalty points to be reported, ensure the order carries a 99minds Points Earned / Used custom field with the points value.

99minds Configuration

  • Configure the 99minds loyalty program and its workflows (order-paid and refund) so the triggered events produce the intended outcome.

Authentication & Security

Authentication uses the 99minds API key configured on the subscription — see the 99minds Installation Instructions.

Integration Flow

  1. Confirm the order passes the collection filter (Type is Order or Validated Return, Status is Complete, and the transaction number does not end in -D or -GC).

  2. Send the transaction number as the Idempotent Id so the same order is not processed twice.

  3. Resolve the order's customer to the matching 99minds customer link, falling back to the customer's email address when no link is found.

  4. Derive the workflow Trigger from the order: a paid order fires the order-paid workflow; validated returns and negative totals fire the refund workflow.

  5. Carry the order totals, subtotal, and item quantity, and report the loyalty points from the order's custom field.

  6. Report a sale total for paid orders and a refund amount for returns and negative totals.

Mappings

Add 99minds Order Completed Workflow FROM iPaaS.com

Mapping Filter

(Type == "Order" || Type == "Validated Return")
&& Status == "Complete" 
&& !TransactionNumber.EndsWith("-D") 
&& !TransactionNumber.EndsWith("-GC") 
//Exclude unwanted integrations here!
//&& SystemId != 1234

Filter Description. Only completed orders and validated returns are processed: the record's Type must be Order or Validated Return, and its Status must be Complete. Transactions whose number ends in -D (discount) or -GC (gift card) are excluded, so only genuine order activity triggers loyalty workflows. The commented line is a placeholder showing where a subscriber can exclude orders from specific sources by SystemId. Adjust the filter as needed to limit orders from specific sources.

Description: Sends a completed iPaaS.com order to 99minds to trigger a loyalty workflow (Add), carrying the order totals, quantity, and customer reference.

Mapping Type

Source Field (iPaaS.com)

Destination Field (99minds)

Description

Field

TransactionNumber

IdempotentId

Required. Sends the iPaaS.com transaction number as the Idempotent Id. 99minds uses this value to make sure the same order is not processed twice, so a single order can never award points or post a refund more than once.

Dynamic Formula

(see formula below)

CustomerId

Resolves the order's customer to the matching customer link in 99minds. It first looks for the customer's existing 99minds reference, and if none is found it falls back to matching the customer by email address, so the loyalty workflow is applied to the correct customer account.

Dynamic Formula

(see formula below)

Trigger

Determines which 99minds loyalty workflow the order should fire. A paid order triggers the order-paid workflow, while validated returns and orders with a negative total are treated as refunds and trigger the refund workflow. Derived automatically from the order.

Dynamic Formula

(see formula below)

TotalPrice

Carries the order total for sales only. Paid orders send their total amount, while returns and negative totals are left empty here so refund activity is reported through the refund amount instead. Adjust the formula to match the transaction types that represent sales in your iPaaS.com account.

Field

Subtotal

SubtotalPrice

Sends the order subtotal — the order amount before tax and other adjustments — to 99minds so the loyalty workflow has the underlying order value.

Field

TotalQty

TotalQuantity

Sends the total number of items on the order to 99minds, giving the loyalty workflow the order's item count.

Dynamic Formula

(see formula below)

LoyaltyPointsClaimed

Reports the loyalty points earned or used on the order, read from the order's 99minds Points Earned / Used custom field. If that custom field has no value, no points figure is sent.

Dynamic Formula

(see formula below)

RefundAmount

Carries the refund amount for return activity only. Validated returns and orders with a negative total send their amount here, while paid orders are left empty so their value is reported as a sale total instead. Adjust the formula to match the transaction types that represent refunds in your iPaaS.com account.

CustomerId formula:

var customerId = await GetExternalIdAsync(CustomerId, "Customer", SpaceportSystemId);
if (customerId == null || customerId == "")
  return await GetCustomerIdByEmail(EmailAddress);
else
  return customerId ;

Trigger formula:

if (Type == "Order" && Total >= 0)
  return "order_paid";
if (Type == "Validated Return" || Total < 0)
  return "order_refunded";
return null;

TotalPrice formula:

if (Type == "Validated Return" || Total < 0)
  return null;
if (Total >= 0)
  return Total;
return null;

LoyaltyPointsClaimed formula:

var value = GetCustomFieldValue(CustomFields, "99minds Points Earned / Used");
if (value != null && value != "")
  return ConvertToInt(value);
else
  return null;

RefundAmount formula:

if (Type == "Order" && Total >= 0)
    return null;
if (Type == "Validated Return" || Total < 0)
    return Total;
return null;

Error Handling

  • Customer cannot be resolved — if the order's customer has no existing 99minds reference and no matching customer is found by email address, the loyalty workflow cannot be applied to a customer account. Confirm the order carries a resolvable customer (by link or email).

  • No workflow trigger derived — if the order is neither a paid order nor a return or negative total, the Trigger resolves to no value and no workflow fires. Confirm the order's Type and total reflect the activity you intend to send.

  • Loyalty points not reported — if the order has no 99minds Points Earned / Used custom field value, no points figure is sent. Confirm the custom field exists and is populated when points should be reported.

Testing & Validation

Test Scenarios

  1. Paid order — create a completed iPaaS.com order (Type Order, Status Complete, non-negative total) with a resolvable customer, transfer it, and confirm the order-paid workflow fires in 99minds with the matching totals and customer.

  2. Refund — transfer a validated return (or an order with a negative total) and confirm the refund workflow fires with the refund amount populated and the sale total left empty.

  3. Loyalty points — transfer an order whose 99minds Points Earned / Used custom field is populated and confirm the points figure is reported; transfer one with the field empty and confirm no points figure is sent.

  4. Idempotency — transfer the same order twice and confirm 99minds does not process it more than once (no duplicate points award or refund).

  5. Customer fallback — transfer an order whose customer has no 99minds link but a valid email and confirm the customer is resolved by email.

  6. Filter — transfer a record that fails the filter (for example, a transaction number ending in -GC, or a Status other than Complete) and confirm it is excluded.

Validation Checklist

  • Completed orders and validated returns fire the correct 99minds workflow (order-paid or refund).

  • Order totals, subtotal, and item quantity are carried to 99minds.

  • The loyalty points figure is reported from the custom field when present and omitted when absent.

  • The transaction number is recorded as the idempotent key and the same order is not processed twice.

Additional Notes

  • Configure the order filter here together with the 99minds Loyalty Card Transaction collections so loyalty is not double-counted.

  • The TotalPrice and RefundAmount formulas should be adjusted to match the transaction types that represent sales and refunds in your iPaaS.com account.

Related Documents

Setup & Reference

Mapping Documentation

Did this answer your question?