Skip to main content

Heartland Transaction From iPaaS

Transfer iPaaS.com transactions to Heartland sales orders

Updated today

Overview

An iPaaSTransaction can be transferred to a Heartland SaleOrder using an Add and Update sync method through manual sync. This mapping supports the automated synchronization of Transaction records from iPaaS into Heartland as SaleOrder.

Client Specific Configuration

The Heartland transaction APIs require a station Id and Inventory Source location Id to be provided when creating orders or tickets, which means these must be provided in the transaction source data or determined using business logic in the required field mappings. The template mappings provided will use a custom field called Heartland Station Id and Heartland Source Location Id as the source of these values, which may be modified as needed; consult with your MISP for more information.

Heartland location Ids are visible in the Heartland retail website in Settings > Locations after clicking on a location name and then viewing the station list at the bottom of the page:

By default, Heartland will auto-increment ticket, order, and invoice numbers. The template mappings provided will override the public-facing values by mapping the iPaaS.com transaction number to the PublicId field in Heartland on the transaction header. The template mappings can be modified to disable the iPaaS-provided transaction numbers as necessary.

Example formula returning null to PublicId (disables the override):

//TransactionNumber
return null; //Use the line above to override Heartland auto assigned numbers
Example formula using the iPaaS.com transaction number to override the PublicId
TransactionNumber
//return null; //Use the line above to override Heartland auto assigned numbers

In transaction mappings to iPaaS.com we recommended you reference External_Id for the iPaaS.com transaction number when transferring multiple Heartland transaction types, as this will include the _ORDER _INVOICE or _TICKET specification to prevent numeric id overlap.

Important: While example template mapping collections are provided for all transaction types in both directions, we do not recommend using them in a bi-directional fashion. Consult with your MISP for more information about planning your data flows, mapping configuration, webhook subscriptions, and polling schedules in a manner that will prevent an endless feedback loop of systems updating the same records

Transaction Notes

Notes may be transferred both to and from Heartland Sales Orders using the example sales order note template mapping collections provided.

Transaction Payments

A helper function is available that can convert the payment method name provided to a matching Heartland payment method id, if found:

return await PaymentTypeIdByName(Method);

Payments can only be transferred to Heartland orders if the payment amount does not exceed the order total. In Heartland, the sales order total is calculated using:

  • Line Item Prices

  • Line Item Taxes

  • Shipping Amounts

For external platforms that do not provide line-item tax amounts individually, it will be necessary to calculate the line-item tax amounts to meet Heartland API requirements. The template mappings provided demonstrate a formula that allocates a proportional amount of line-item tax to the product total portion of the order subtotal; consult with your MISP for assistance in configuring more advanced logic.

Although the Heartland order UI may only show two decimal places for the order totals, it is possible to set larger amounts in the subsequent decimal places. This may not be apparent until you attempt to add payments to the order and receive an error from Heartland, such as “Payment cannot exceed balance of sales.” It is recommended to round all tax amounts sent to Heartland to only two decimal places to prevent and assist with troubleshooting such errors.”

Depending on the payment type, different Heartland API request requirements apply when adding transaction payments. A different template mapping collection has been provided, demonstrating the requirements for each type. These template mapping collection filters depend on a transaction payment custom field called “Heartland Payment Type” to indicate the desired Heartland payment type. Adjust the mappings for each type as needed to suit your workflow needs:

  • CashPayment

  • CheckPayment

  • GiftCardPayment

  • CustomPayment

  • ExternalPayment

Heartland only allows Gift Card, Custom, or External payment types to be applied as order deposits. It is recommended to use a dedicated Custom or External payment type to represent external order payments when importing orders from iPaaS.com.

IMPORTANT: Gift Card payment types used for Sales Orders perform different actions in Heartland depending on the request. The actions below are not documented or supported by Heartland and are therefore subject to change at any time. These are provided for demonstration purposes only and may be used at your own risk.

Status mapping

Deposit mapping

Result

pending

true

This will decrease the Heartland Gift Card balance upon order creation.

pending

false

This will decrease the Heartland Gift Card balance upon invoice.

complete

true

Invoice and Order create does NOT reduce Heartland Gift Card Balance.

complete

false

Invoice and Order create does NOT reduce Heartland Gift Card Balance.

Gift Card payment types used for Sales Orders perform different actions in Heartland depending on the request. Heartland does not document the actions below, and they are subject to change at any time.

Status mapping

Deposit mapping

Result

pending

true

This will decrease the Heartland Gift Card balance upon ticket creation.

pending

false

This will decrease the Heartland Gift Card balance upon ticket completion.

complete

true

Ticket create and complete do NOT reduce Heartland Gift Card Balance.

complete

false

Ticket create and complete do NOT reduce Heartland Gift Card Balance.

Even when using settings above to preserve gift card balances used for order or ticket payments, the Heartland API requires an available balance equal to or greater than the payment amount. This can create problems for gift cards integrated to other platforms, where the gift card may be fully depleted on a transaction. For these scenarios, an optional subscription setting, Adjust Empty Gift Card For Payment, exists that, when enabled, checks whether a gift card payment from iPaaS references a $ 0-balance card. If the card is $0, the card in Heartland will be adjusted to allow the full payment amount to be added as payment to the Heartland transaction, and then the $0 balance will be re-transferred to set it back. To enable this feature, set the subscription setting to True.

Transaction Shipping Methods

A helper function, HeartlandShippingMethodIdByName, is provided to convert the provided name to the corresponding Heartland shipping Method id, if found. If no match is found, a zero will be returned.

Example mapping using an iPaaS transaction address shipping method with the HeartlandShippingMethodIdByName function, which will throw an error if no match is found:

var shipMethod = FieldFromFirstMatch(Addresses, "IsPrimaryShipping == true", "ShippingMethod");
if (shipMethod != null && shipMethod != "") {
var value = await HeartlandShippingMethodIdByName(shipMethod.toString());
if(value == 0){ throw new exception($"{shipMethod} shipping method could not be found in Heartland and will prevent this transfer");}
return value;
}
return null;

Transaction Addresses

Heartland Sales Orders require a Transaction, billing address, and shipping address for all sales orders. Transaction Addresses provided by iPaaS.com must have the IsPrimaryBilling and IsPrimaryShipping flags set in the mappings to indicate the proper address to use. Adjust these mappings if you will be using fields other than the corresponding iPaaS.com IsPrimaryBilling and IsPrimaryShipping fields to indicate this.

When creating a Sales Order in Heartland, the Transaction is first checked to see whether any addresses have an exact match already exist, and if so, that address will be assigned to the Sales Order. If an exact match does not exist, it will be added and linked to the Sales Order.

IMPORTANT: While Heartland may require a Transaction to create a Sales Order, other platforms that generate sales orders may not. In scenarios where the source data provides no corresponding Transaction record to transfer with the order, it may be necessary to create a “placeholder” Transaction account for the guest's orders to be assigned to, and to adjust any mappings to link those orders to the placeholder Transaction Id in iPaaS.com. The Heartland orders would reference the placeholder “Guest Transaction” account rather than an individual, because no individual account was created in the source system or iPaaS.com. When using the placeholder approach, it is recommended to review mapping filters to exclude the placeholders where needed. For example, it is typically unnecessary to send placeholder Transaction addresses to various platforms, as they are invalid and would only delay expected data transfers. Therefore, the Transaction address mapping collection filters could be modified to exclude the addresses used for that Transaction.

Ticket Notes

Unlike sales orders, shipping amounts and taxes must be transferred as line items to Heartland tickets instead of using transaction header values. Parent-only mapping collections are provided in the template mappings, which create “virtual” line items on Heartland tickets to represent these amounts.

IMPORTANT: Tax lines must include the ManuallyAdded = true mapping provided in the template mappings; otherwise, Heartland will remove the added tax line.

Invoice Requirements

By default, the template mappings provided will attempt to create an invoice in Heartland for any order linked to iPaaS.com that is flagged as complete when a transfer of that order to Heartland is attempted.

Invoices may only be created for open orders, which must initially be created with a status other than complete. The template mappings provided force all new Sales Orders created in Heartland by iPaaS.com to use a “pending” order status, which is required to add payments to the order. After the payment is added, the order is set to “open” status. Once all line items are invoiced, the order will automatically be updated to a “closed” status.

Disable the Invoice Add From iPaaS Order Complete template mapping collection to disable the invoice creation from iPaaS.com order status updates.

NOTE: When using the invoice create functionality from a linked order update, only one invoice can be created in Heartland, and partial invoicing is not possible. For this reason, we recommended that you invoice only completed orders, and the mapping collection filter shown above is used to check whether an invoice has already been created.

Invoice handling is controlled using mappings to two Heartland transaction fields in iPaaS.com:

  • CreateInvoice: This field mapping must be set to “true” for the transfer to be processed as an invoice

  • SaveInvoiceId: One of two values may be entered here;

    • A custom field name: enter the iPaaS.com transaction custom field name that you would like to save the resulting Heartland invoice id to

    • “ExternalId” - Enter “ExternalId” without quotes to save the invoice Id to the transaction external Id. This should never be used when creating invoices from linked order updates in iPaaS.com and should only be used to create new invoices from iPaaS.com transactions. In this scenario, the iPaaS.com transaction is solely linked to the invoice, and not a sales order and an invoice.

NOTE: Invoice updates from iPaaS.com are not currently supported.

Transaction Tracking records in iPaaS, mapped as children of Heartland invoices, will be used to add shipment information to the invoice before completion. Heartland will only allow one tracking number to be displayed, so iPaaS.com will only set the “last” tracking number found from such mappings.

Example invoice where only one tracking number may be entered in Heartland:

An invoice may not be completed until payment is entered, so the Heartland integration with iPaaS.com will first create an invoice, add payments, and then complete it.

To create an invoice directly (and not from an update to a sales order) several values will be required, such as:

  • Original Heartland order id mapped to OrderId in the transaction header.

  • Original Heartland order line id for any line items included on the invoicemapped to OrderLineId in the transaction lines.

  • Mapping to Type in the transaction header must be a static value of “invoice”.

  • Mapping to CreateInvoice in the transaction header returns a value of “true”.

  • Mapping to Status in the transaction header must be a value of “complete”.

In addition, if the OrderId provided to the invoice is not in an “open” state, the transfer will error that an invoice could not be attempted due to the current state.

When transferring invoices to iPaaS.com, sales tax and line item information is included as separate line items as opposed to transaction header totals. A helper function HeartlandLineValueByType is included, which will return the amount found on the first line item type provided in the list of lines provided.

Example mapping formulas to return amounts from first tax and shipping invoice line found:

  • HeartlandLineValueByType(Transaction_Lines,"TaxLine")

  • HeartlandLineValueByType(Transaction_Lines,"ShippingLine")

Deposit Tickets

When transferring Sales Orders to iPaaS.com, a deposit ticket will be created in iPaaS.com to provide compatibility with other integrations. The deposit ticket is an exact copy of the original order with –D appended to the transaction number and all external record identifiers. To disable this feature, disable or delete the template mapping collections provided:

  • Heartland Sales Order Deposit Add To iPaaS

  • Heartland Sales Order Deposit Address Add To iPaaS

  • Heartland Sales Order Deposit Line Add To iPaaS

  • Heartland Sales Order Deposit Line Discount Add To iPaaS

  • Heartland Sales Order Deposit Payment Add To iPaaS

  • Heartland Sales Order Deposit Tax Add To iPaaS

Integration Flow

  1. Transaction Creation: A new Transaction record is created in Heartland with the mapped details.

  2. Customer Resolution: The system finds the corresponding Customer in Heartland using their external ID or customer ID.

  3. Transaction Payment Resolution: The system finds the corresponding Transaction Payment in Heartland using their PaymentTypeID.

  4. Transaction Resolution: The system finds the corresponding Transaction in Heartland using their external ID. If Not Found will Create a Payment Method.

  5. Transaction Resolution: The system finds the corresponding Transaction in Heartland using their external ID or email address.

  6. Child Collections Insertion: Related child collections (Address) are inserted to complete the Transaction record.

Integration Settings

  • Mapping Status: Enabled.

  • ID Format: When manually transferring Transactions from iPaaS.com, you need to enter the valid Transaction ID (internal ID) into the "iPaaS.com" input field on the iPaaS.com Manual Sync page. For example, use: 145146.

  • Conflicting Mappings: This mapping applies only to Transaction. Ensure no other mappings target the same Heartland entity to prevent data from being overwritten.

Support Child Collection

The integration supports the synchronization of the parent Transaction and its related child collections:

  • Transaction Line

  • Transaction Payment

  • Transaction Tracking Number

  • Transaction Address

  • Transaction Notes

  • Transaction line Discount

  • Transaction Tax

Mappings

Parent Collection: Heartland Invoice Add From iPaaS Invoice

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Invoice Id");
if (Type == "Invoice" && Status == "Complete" && string.IsNullOrEmpty(value)){
return true;//Only invoice completed
}
return false;

Description

Disable this mapping collection if you will not be creating Heartland invoices from iPaaS invoice transactions.

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

TransactionNumber //return null; //Use the line above to override Heartland auto assigned numbers

PublicId

Maps the TransactionNumber field from iPaaS to the invoice PublicId field in Heartland.

Static

complete

Status

Static value is mapped to the Invoice Status field in Heartland.

Dynamic Formula

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

CustomerId

This logic first tries to retrieve the customerId using the GetExternalIdAsync method with the given CustomerId, "Customer", and SpaceportSystemId. If the retrieved value is null or empty, it then calls the GetCustomerIdByEmail method to obtain the customer ID using the EmailAddress. Otherwise, it returns the customerId retrieved from the initial call.

Field

Heartland Station Id (Custom Field)

StationId

The iPaaS Transaction Heartland Station Id is added to the “StationId” field in the Heartland Invoice.

Field

Heartland Source Location Id

SourceLocationId

The iPaaS Transaction Heartland Station Location Id is added to the “StationLocationId” field in the Heartland Invoice.

Dynamic Formula

var value = GetCustomFieldValue(CustomFields, "Heartland Invoice Order Id"); if(!string.IsNullOrEmpty(value)){ return ConvertToLong(value); } return null;

OrderId

Retrieves the "Heartland Invoice Order Id" from CustomFields, converts it to a long if it’s not empty, and returns it; otherwise, it returns null.

Static

Invoice

Type

The iPaaS Transaction Invoice is added to the “Type” field in the Heartland Invoice.

Dynamic Formula

return true

CreateInvoice

Returns true, indicating that a condition or operation has succeeded.

Static

ExternalId

SaveInvoiceId

The iPaaS Transaction ExternalId is added to the “SaveInvoiceId” field in the Heartland Invoice.

Static

iPaaS.com

Transaction Source

The iPaaS Transaction iPaaS.comis added to the “Transaction Source” field in the Heartland Invoice.

Child Collection: Heartland Transaction Line From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Invoice Order Line Id");
if(string.IsNullOrEmpty(value)){
throw new exception($"Transaction {Parent.TransactionNumber} can not be invoiced because line item {Sku} is not linked to a Heartland sales order line id. Adjust the mapping collection filter to change this validation.");
}
return true;

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

var itemId = await GetItemIdBySku(Sku); if(itemId > 0) return itemId; throw new exception($"Sku: {Sku} was not found in Heartland preventing this transaction from transferring") //return false;

ItemId

Checks for an item ID using the given SKU. If the ID exists and is greater than zero, it returns the ID. If no matching item is found, it throws an exception saying the SKU doesn’t exist in Heartland, so the transaction can’t continue.

Field

Qty

Qty

The iPaaS Transaction Qty is added to the “Qty” field in the Heartland Invoice.

Field

Heartland Invoice Order Line Id

OrderLineId

The iPaaS Transaction Heartland Invoice Order Line Id is added to the “OrderLineId” field in the Heartland Invoice.

Field

ItemLine

Type

The iPaaS Transaction ItemLine is added to the “Type” field in the Heartland Invoice.

Child Collection: Heartland Transaction Tracking Number From iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Field

TrackingNumber

TrackingNumber

The iPaaS Transaction TrackingNumber is added to the “TrackingNumber” field in the Heartland Invoice.

Child Collection: Heartland Transaction Payment From iPaaS

Mapping Filter

1 == 1

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

//ExternalPayment return null;

Type

Heartland built-in payment types are: "type": "CashPayment", "payment_type_id": 1, "type": "CheckPayment", "payment_type_id": 2, "type": "GiftCardPayment", "payment_type_id": 3

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Invoice.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Invoice.

Dynamic Formula

//var paymentTypeId = await PaymentTypeIdByName(Method); //if(paymentTypeId != null && paymentTypeId > 0) // return paymentTypeId; //throw new exception($"Payment method {Method} could not be found in Heartland and is preventing transfer of this order") //uncomment the above code to use Heartland payment methods return null;

PaymentTypeId

Checks for a payment type ID by method name. If found, it returns the ID; otherwise, it throws an error. Currently, it’s commented out and returns null.

Field

Description

Description

The iPaaS Transaction Description is added to the “ Description” field in the Heartland Invoice.

Parent Collection: Heartland Invoice Add From iPaaS Order Complete

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Invoice Id");
if (Type == "Order" && Status == "Complete" && string.IsNullOrEmpty(value)){
return true;//Only invoice completed orders once
}
return false;

Description

Disable this mapping collection if you will not be creating Heartland invoices from iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

TransactionNumber+"-INV" //return null; //Use the line above to override Heartland auto assigned numbers

PublicId

Adds “-INV” to the transaction number to create a custom invoice ID. The commented line shows that returning null would let Heartland assign the number automatically instead.

Static

complete

Status

Static value is mapped to the Invoice Status field in Heartland.

Dynamic Formula

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

CustomerId

Gets a customer’s external ID. If the ID is missing or empty, it fetches the customer ID using the email address; otherwise, it returns the existing ID.

Field

Heartland Station Id (Custom Field)

StationId

The iPaaS Transaction Heartland Station Id is added to the “StationId” field in the Heartland Invoice.

Field

Heartland Source Location Id

SourceLocationId

The iPaaS Transaction Heartland Station Location Id is added to the “StationLocationId” field in the Heartland Invoice.

Static

Invoice

Type

The iPaaS Transaction Invoice is added to the “Type” field in the Heartland Invoice.

Dynamic Formula

return true

CreateInvoice

Returns true, indicating that a condition or operation has succeeded.

Static

Heartland Invoice Id

SaveInvoiceId

The iPaaS Transaction Heartland Invoice Id is added to the “SaveInvoiceId” field in the Heartland Invoice.

Static

iPaaS.com

Transaction Source

The iPaaS Transaction iPaaS.comis added to the “Transaction Source” field in the Heartland Invoice.

Child Collection: Heartland Transaction Line From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Invoice Order Line Id");
if(string.IsNullOrEmpty(value)){
throw new exception($"Transaction {Parent.TransactionNumber} can not be invoiced because line item {Sku} is not linked to a Heartland sales order line id. Adjust the mapping collection filter to change this validation.");
}
return true;

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

var itemId = await GetItemIdBySku(Sku); if(itemId > 0) return itemId; throw new exception($"Sku: {Sku} was not found in Heartland preventing this transaction from transferring") //return false;

ItemId

Checks for an item ID using the given SKU. If the ID exists and is greater than zero, it returns the ID. If no matching item is found, it throws an exception saying the SKU doesn’t exist in Heartland, so the transaction can’t continue.

Field

Qty

Qty

The iPaaS Transaction Qty is added to the “Qty” field in the Heartland Invoice.

Field

ItemLine

Type

The iPaaS Transaction ItemLine is added to the “Type” field in the Heartland Invoice.

Child Collection: Heartland Transaction Tracking Number From iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Field

TrackingNumber

TrackingNumber

The iPaaS Transaction TrackingNumber is added to the “TrackingNumber” field in the Heartland Invoice.

Child Collection: Heartland Transaction Payment From iPaaS

Mapping Filter

1 == 1

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

ExternalPayment

Type

Heartland built-in payment types are: "type": "CashPayment", "payment_type_id": 1, "type": "CheckPayment", "payment_type_id": 2, "type": "GiftCardPayment", "payment_type_id": 3

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Invoice.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Invoice.

Dynamic Formula

//var paymentTypeId = await PaymentTypeIdByName(Method); //if(paymentTypeId != null && paymentTypeId > 0) // return paymentTypeId; //throw new exception($"Payment method {Method} could not be found in Heartland and is preventing transfer of this order") //uncomment the above code to use Heartland payment methods return null;

PaymentTypeId

Finds a payment type ID using the payment method name. If found, it returns the ID; otherwise, it throws an exception. Since the code is commented out, it currently just returns null instead.

Field

Description

Description

The iPaaS Transaction Description is added to the “ Description” field in the Heartland Invoice.

Parent Collection: Heartland Sales Order Add From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Invoice Id");
if (Type == "Order" && string.IsNullOrEmpty(value)){
return true;//Only invoice completed orders once
}
return false;

Description

Disable this mapping collection if you will not be creating Heartland invoices from iPaaS invoice transactions.

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

TransactionNumber //return null; //Use the line above to override Heartland auto assigned numbers

PublicId

Returns the TransactionNumber. The commented line shows that returning null would let Heartland assign the number automatically instead.

Static

pending

Status

The iPaaS Transaction pending is added to the “Status” field in the Heartland Sales Order.

Dynamic Formula

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

CustomerId

Gets a customer’s external ID. If it’s missing or empty, it retrieves the customer ID using the email address; otherwise, it returns the existing ID.

Field

Heartland Station Id (Custom Field)

StationId

The iPaaS Transaction Heartland Station Id is added to the “StationId” field in the Heartland Sales Order.

Field

Heartland Source Location Id

SourceLocationId

The iPaaS Transaction Heartland Station Location Id is added to the “StationLocationId” field in the Heartland Sales Order.

Dynamic Formula

var shipMethod = FieldFromFirstMatch(Addresses, "IsPrimaryShipping == true", "ShippingMethod"); if (shipMethod != null && shipMethod != "") { var value = await HeartlandShippingMethodIdByName(shipMethod.toString()); if(value == 0){ throw new exception($"{shipMethod} shipping method could not be found in Heartland and will prevent this transfer");} return value; } return null; if(value == 0){ throw new exception($"{shipMethod} shipping method could not be found in Heartland and will prevent this transfer");} return value; } return null;

ShippingMethodId

Retrieves the shipping method from the primary shipping address. If a valid method is found, it looks up its Heartland Shipping Method ID. If the ID is 0, it throws an exception indicating that the shipping method doesn’t exist in Heartland and will block the transfer. Otherwise, it returns the ID. If no shipping method is found, it returns null.

Field

ShippingAmount

ShippingCharge

The iPaaS Transaction ShippingAmount is added to the “ShippingCharge” field in the Heartland Sales Order.

Static

Order

Type

The iPaaS Transaction Order is added to the “Type” field in the Heartland Sales Order.

Dynamic Formula

return false

CreateInvoice

Returns false, indicating that a condition failed or an operation was unsuccessful.

Static

iPaaS.com

Transaction Source

The iPaaS Transaction iPaaS.com is added to the “Transaction Source” field in the Heartland Sales Order.

Child Collection: Heartland Sales Order Address Add From iPaaS

Mapping Filter

IsPrimaryBilling || IsPrimaryShipping

Mapping Type

Source (Heartland)

Destination ( iPaaS.com )

Description

Field

FirstName

FirstName

The iPaaS Transaction FirstName is added to the “FirstName” field in the Heartland Sales Order Address.

Field

LastName

LastName

The iPaaS Transaction LastName is added to the “LastName” field in the Heartland Sales Order Address.

Field

Address1

Line1

The iPaaS Transaction Address1 is added to the “Line1” field in the Heartland Sales Order Address.

Field

Address2

Line2

The iPaaS Transaction Address2 is added to the “Line2” field in the Heartland Sales Order Address.

Field

City

City

The iPaaS Transaction City is added to the “City” field in the Heartland Sales Order Address.

Field

Region

State

The iPaaS Transaction Region is added to the “State” field in the Heartland Sales Order Address.

Field

Country

Country

The iPaaS Transaction Country is added to the “Country” field in the Heartland Sales Order Address.

Field

PostalCode

PostalCode

The iPaaS Transaction PostalCode is added to the “PostalCode” field in the Heartland Sales Order Address.

Field

IsPrimaryBilling

IsPrimaryBilling

The iPaaS Transaction IsPrimaryBilling is added to the “IsPrimaryBilling” field in the Heartland Sales Order Address.

Field

IsPrimaryShipping

IsPrimaryShipping

The iPaaS Transaction IsPrimaryShipping is added to the “IsPrimaryShipping” field in the Heartland Sales Order Address.

Child Collection: Heartland Sales Order Cash Payment Add From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "CashPayment"){return true;}
}
return false;

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

CashPayment

Type

The iPaaS Transaction CashPayment is added to the “Type” field in the Heartland Sales Order Cash.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland xSales Order Cash.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Sales Order Cash.

Static

1

PaymentTypeId

The iPaaS Transaction 1 is added to the “PaymentTypeId” field in the Heartland Sales Order Cash.

Dynamic Formula

return false;

Deposit

Returns false, indicating that a condition failed or an operation was unsuccessful.

Dynamic Formula

var value = GetCustomFieldValue(Parent.CustomFields, "Heartland Station Id"); if(!string.IsNullOrEmpty(value.ToString())){ return Convert.ToInt32(value); } return null;

StationId

This code gets the "Heartland Station Id" from the parent’s custom fields. If the value isn’t empty, it converts it to an integer and returns it; otherwise, it returns null.

Child Collection: Heartland Sales Order Check Payment Add From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "CheckPayment"){return true;}
}
return false;

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

CheckPayment

Type

The iPaaS Transaction CheckPaymentis added to the “Type” field in the Heartland Sales Order Check.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Sales Order Check .

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Sales Order Check.

Static

2

PaymentTypeId

The iPaaS Transaction 2 is added to the “PaymentTypeId” field in the Heartland Sales Order Check.

Dynamic Formula

//Add custom check data and return an object. var exampleData = "{\"Details\":\"Example Check Information\"}"; //var exampleData = "{}"; return ConvertJsonStringToDynamicObject(exampleData);

Custom

Creates a sample JSON string containing check details, then converts it into a dynamic object using ConvertJsonStringToDynamicObject and returns it.

Dynamic Formula

return false;

Deposit

Returns false, indicating that a condition failed or an operation was unsuccessful.

Dynamic Formula

var value = GetCustomFieldValue(Parent.CustomFields, "Heartland Station Id"); if(!string.IsNullOrEmpty(value.ToString())){ return Convert.ToInt32(value); } return null;

StationId

Retrieves the "Heartland Station Id" from the parent’s custom fields. If the value exists and isn’t empty, it converts it to an integer and returns it; otherwise, it returns null.

Child Collection: Heartland Sales Order Customer Payment Add From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "CustomPayment"){return true;}
}
return false;

Description

Heartland requires different payment request formats depending on the payment type.

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

CustomerPayment

Type

The iPaaS Transaction CustomerPaymentis added to the “Type” field in the Heartland Sales Order Customer.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Sales Order Customer.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Sales Order Customer.

Dynamic Formula

var paymentTypeId = await PaymentTypeIdByName(Method.ToString()); if(paymentTypeId != null && paymentTypeId > 0) return paymentTypeId; throw new exception($"Payment method \"{Method}\" could not be found in Heartland and is preventing transfer of this order"); return null;

PaymentTypeId

Retrieves the payment type ID using the given Method. If a valid ID is found (greater than zero), it returns it. If not, it throws an exception indicating that the payment method wasn’t found in Heartland, blocking the order transfer.

Dynamic Formula

//Add custom check data and return an object. var exampleData = "{\"Details\":\"Example Check Information\"}"; //var exampleData = "{}"; return ConvertJsonStringToDynamicObject(exampleData);

Custom

Creates a sample JSON string containing check details, then converts it into a dynamic object using ConvertJsonStringToDynamicObject and returns it.

Dynamic Formula

return true;

Deposit

Returns false, indicating that a condition failed or an operation was successful.

Child Collection: Heartland Sales Order External Payment Add From iPaaS

Mapping Filter

//Heartland requires different formats depending on the type
var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "ExternalPayment"){return true;}
}
return false;

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

ExternalPayment

Type

The iPaaS Transaction ExternalPayment is added to the “Type” field in the Heartland Sales Order External.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Sales Order External.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Sales Order External.

Dynamic Formula

return false;

Deposit

Returns false, indicating that a condition failed or an operation was unsuccessful.

Field

Description

Description

The iPaaS Transaction Description is added to the “Description” field in the Heartland Sales Order External.

Child Collection: Heartland Sales Order Gift Card Payment Add From iPaaS

Description

Heartland requires different payment request formats depending on the payment type.

IMPORTANT: Adjust these mappings to the needs of your workflow:

  • Status: pending Deposit: true will decrease the Heartland Gift Card balance upon order creation.

  • Status: pending Deposit: false will decrease the Heartland Gift Card balance upon invoice.

  • Status: complete Deposit: True. Invoice and Order create does NOT reduce Heartland Gift Card Balance.

  • Status: complete Deposit: False. Invoice and Order create does NOT reduce Heartland Gift Card Balance

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

GiftCardPayment

Type

The iPaaS Transaction GiftCardPayment is added to the “Type” field in the Heartland Sales Order Gift Card.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Sales Order Gift Card.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Sales Order Gift Card.

Static

3

PaymentTypeId

The iPaaS Transaction 3 is added to the “PaymentTypeId” field in the Heartland Sales Order Gift Card.

Dynamic Formula

return true;

Deposit

Returns false, indicating that a condition failed or an operation was successful.

Dynamic Formula

if (MethodInfo == null) return null; if (!MethodInfo.ContainsKey("GiftCardId")) return null; //Example 1 - Provide the gift card number return await GetGiftCardRedemptionNumberAsync(MethodInfo); // Example 2 - Provide the gift card external id and error if it does not exist var ipaasId = MethodInfo["GiftCardId"]; var external = await GetExternalIdAsync(ipaasId, "Gift Card", SpaceportSystemId); if( external == null || external == ""){ throw new exception($"Gift Card Id {ipaasId} does not exist in Heartland and will prevent transfer of this order payment"); } return external;

GiftCardNumber

Checks for gift card details in MethodInfo. If it’s missing or doesn’t contain a GiftCardId, it returns null. Otherwise, it tries two approaches: First, it gets the gift card redemption number using GetGiftCardRedemptionNumberAsync. Second, it retrieves the external ID for the gift card using GetExternalIdAsync. If the external ID doesn’t exist, it throws an exception indicating the gift card isn’t found in Heartland and will block the order transfer.

Child Collection: Heartland Sales Order Line Item Add From iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

var itemId = await GetItemIdBySku(Sku); if(itemId > 0) return itemId; throw new exception($"Sku: {Sku} was not found in Heartland preventing this transaction from transferring") //return false;

ItemId

Retrieves the item ID using the given SKU. If a valid ID (greater than zero) is found, it returns it. Otherwise, it throws an exception stating that the SKU wasn’t found in Heartland, which stops the transaction from proceeding.

Field

Qty

Qty

The iPaaS Transaction QTY is added to the “QTY” field in the Heartland Sales Order Line Item.

Field

OriginalUnitPrice

OriginalUnitPrice

The iPaaS Transaction OriginalUnitPrice is added to the “OriginalUnitPrice” field in the Heartland Sales Order Line Item.

Dynamic Formula

if ( Parent.Subtotal != 0 && (EstimatedTaxAmount == null || 1 == 1)) { //Modify above filter to always use line tax amounts from iPaaS.com //This will distribute the total header tax amount among line items based on line extended price and ticket subtotal var proportion = ExtendedPrice / Parent.Subtotal; var lineAmount = proportion * Parent.TaxAmount; return Math.Round(lineAmount,2); } else return EstimatedTaxAmount;

TotalTax

Calculates the tax amount for a line item. If the parent subtotal isn’t zero, it distributes the total tax across line items based on each item’s ExtendedPrice proportion of the subtotal. It then rounds the result to two decimal places. Otherwise, it returns the existing EstimatedTaxAmount.

Field

UnitPrice

AdjustedUnitPrice

The iPaaS Transaction UnitPrice is added to the “AdjustedUnitPrice” field in the Heartland Sales Order Line Item.

Child Collection: Heartland Sales Order Note Add From iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

Text

Content

The iPaaS Transaction Text is added to the “Content” field in the Heartland Sales Order Note.

Parent Collection: Heartland Ticket Add From iPaaS

Mapping Filter

Type == "Ticket"
&& !TransactionNumber.Endswith("-GC")
&& !TransactionNumber.Endswith("-D")

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

TransactionNumber //return null; //Use the line above to override Heartland auto assigned numbers

PublicId

Returns the TransactionNumber. The commented line indicates that returning null would let Heartland automatically assign the transaction number instead.

Static

complete

Status

The iPaaS Transaction Complete is added to the “Status” field in the Heartland Ticket.

Dynamic Formula

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

CustomerId

Gets a customer’s external ID. If the ID is missing or empty, it fetches the customer ID using the email address; otherwise, it returns the existing ID.

Field

Heartland Station Id

StationId

The iPaaS Transaction Heartland Station Id is added to the “StationId” field in the Heartland Ticket.

Field

Heartland Source Location Id

SourceLocationId

The iPaaS Transaction Heartland Station Location Id is added to the “StationLocationId” field in the Heartland Ticket.

Field

Total

Total

The iPaaS Transaction Total is added to the “Total” field in the Heartland Ticket.

Static

Ticket

Type

The iPaaS Transaction Ticket is added to the “Type” field in the Heartland Ticket.

Static

iPaaS.com

Transaction Source

The iPaaS Transaction iPaaS.comis added to the “Transaction Source” field in the Heartland Ticket.

Child Collection: Heartland Ticket Cash Payment From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "CashPayment"){return true;}
}
return false;

Description

Heartland requires different payment request formats depending on the payment type.

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

CashPayment

Type

The iPaaS Transaction CashPayment is added to the “Type” field in the Heartland Ticket Cash.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Ticket Cash.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Ticket Cash.

Field

1

PaymentTypeId

The iPaaS Transaction 1 is added to the “PaymentTypeId” field in the Heartland Ticket Cash.

Dynamic Formula

return false;

Deposit

Returns false, indicating that a condition failed or the operation was not successful.

Dynamic Formula

var value = GetCustomFieldValue(Parent.CustomFields, "Heartland Station Id"); if(!string.IsNullOrEmpty(value.ToString())){ return Convert.ToInt32(value); } return null;

StationId

Retrieves the "Heartland Station Id" from the parent’s custom fields. If the value exists and is not empty, it converts it to an integer and returns it; otherwise, it returns null.

Child Collection: Heartland Ticket Check Payment From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "CheckPayment"){return true;}
}
return false;

Description

Heartland requires different payment request formats depending on the payment type.

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

CheckPayment

Type

The iPaaS Transaction CheckPayment is added to the “Type” field in the Heartland Ticket Check.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Ticket Check.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Ticket Check.

Field

2

PaymentTypeId

The iPaaS Transaction 2 is added to the “PaymentTypeId” field in the Heartland Ticket Check.

Dynamic Formula

//Add custom check data and return an object. var exampleData = "{\"Details\":\"Example Check Information\"}"; //var exampleData = "{}"; return ConvertJsonStringToDynamicObject(exampleData);

Custom

Creates a sample JSON string with check details, converts it into a dynamic object using ConvertJsonStringToDynamicObject, and returns it.

Dynamic Formula

return false;

Deposit

Returns false, indicating that a condition failed or the operation was not successful.

Dynamic Formula

var value = GetCustomFieldValue(Parent.CustomFields, "Heartland Station Id"); if(!string.IsNullOrEmpty(value.ToString())){ return Convert.ToInt32(value); } return null;

StationId

Retrieves the "Heartland Station Id" from the parent’s custom fields. If the value exists and is not empty, it converts it to an integer and returns it; otherwise, it returns null.

Child Collection: Heartland Ticket Custom Payment From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "CustomPayment"){return true;}
}
return false;

Description

Heartland requires different payment request formats depending on the payment type.

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

CustomPayment

Type

The iPaaS Transaction CustomPayment is added to the “Type” field in the Heartland Ticket Custom.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Ticket Custom.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Ticket Custom.

Field

var paymentTypeId = await PaymentTypeIdByName(Method.ToString()); if(paymentTypeId != null && paymentTypeId > 0) return paymentTypeId; throw new exception($"Payment method \"{Method}\" could not be found in Heartland and is preventing transfer of this order"); return null;

PaymentTypeId

Retrieves the payment type ID for the given Method. If a valid ID is found (greater than zero), it returns it. Otherwise, it throws an exception stating that the payment method wasn’t found in Heartland, which blocks the order transfer.;

Dynamic Formula

//Add custom payment data and return an object. var exampleData = "{\"Details\":\"Example custom payment Information\"}"; //var exampleData = "{}"; return ConvertJsonStringToDynamicObject(exampleData);

Custom

Creates a sample JSON string with check details, converts it into a dynamic object using ConvertJsonStringToDynamicObject, and returns it.

Dynamic Formula

return true;

Deposit

Returns true, indicating that a condition is met or an operation was successful.

Child Collection: Heartland Ticket External Payment From iPaaS

Mapping Filter

//Heartland requires different formats depending on the type
var valueE = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(valueE)){
if(valueE == "ExternalPayment"){return true;}
}
return false;

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

ExternalPayment

Type

The iPaaS Transaction ExternalPayment is added to the “Type” field in the Heartland Ticket External.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Ticket External .

Dynamic Formula

return true;

Deposit

Returns true, indicating that a condition is met or an operation was successful.

Field

Description

Description

The iPaaS Transaction Description is added to the “Description” field in the Heartland Ticket External.

Child Collection: Heartland Ticket Gift Card Payment From iPaaS

Mapping Filter

var value = GetCustomFieldValue(CustomFields, "Heartland Payment Type");
if(!string.IsNullOrEmpty(value)){
if(value == "GiftCardPayment"){return true;}
}
return false;

Description

Heartland requires different payment request formats depending on the payment type.

IMPORTANT: Adjust these mappings to the needs of your workflow:

  • Status: pending Deposit: true will decrease the Heartland Gift Card balance upon order creation.

  • Status: pending Deposit: false will decrease the Heartland Gift Card balance upon invoice.

  • Status: complete Deposit: True. Invoice and Order create does NOT reduce Heartland Gift Card Balance.

  • Status: complete Deposit: False. Invoice and Order create does NOT reduce Heartland Gift Card Balance

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

GiftCardPayment

Type

The iPaaS Transaction GiftCardPayment is added to the “Type” field in the Heartland Ticket Gift Card.

Static

complete

Status

The iPaaS Transaction complete is added to the “Status” field in the Heartland Ticket Gift Card.

Field

Amount

Amount

The iPaaS Transaction Amount is added to the “Amount” field in the Heartland Ticket Gift Card.

Field

3

PaymentTypeId

The iPaaS Transaction 3 is added to the “PaymentTypeId” field in the Heartland Ticket Gift Card.

Dynamic Formula

return false;

Deposit

Returns false, indicating that a condition failed or the operation was not successful.

Dynamic Formula

if (MethodInfo == null) return null; if (!MethodInfo.ContainsKey("GiftCardId")) return null; // Get the gift card id var ipaasId = MethodInfo["GiftCardId"]; var external = await GetExternalIdAsync(ipaasId, "Gift Card", SpaceportSystemId); if( external == null || external == ""){ throw new exception($"Gift Card Id {ipaasId} does not exist in Heartland and will prevent transfer of this order payment"); } return external;

GiftCardNumber

Checks for gift card information in MethodInfo. If MethodInfo is missing or doesn’t contain a GiftCardId, it returns null. Otherwise, it retrieves the external ID for the gift card using GetExternalIdAsync. If the external ID doesn’t exist, it throws an exception indicating the gift card isn’t found in Heartland, blocking the order payment transfer. If found, it returns the external ID.

Child Collection: Heartland Ticket Line Item Add From iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

var itemId = await GetItemIdBySku(Sku); if(itemId > 0) return itemId; throw new exception($"Sku: {Sku} was not found in Heartland preventing this transaction from transferring") //return false;

ItemId

Checks for an item ID using the given SKU. If the ID exists and is greater than zero, it returns the ID. If no matching item is found, it throws an exception saying the SKU doesn’t exist in Heartland, so the transaction can’t continue.

Field

Qty

Qty

The iPaaS Transaction Qty is added to the “Qty” field in the Heartland Ticket Line Item.

Field

OriginalUnitPrice

OriginalUnitPrice

The iPaaS Transaction OriginalUnitPrice is added to the “OriginalUnitPrice” field in the Heartland Ticket Line Item.

Field

UnitPrice

AdjustedUnitPrice

The iPaaS Transaction UnitPrice is added to the “AdjustedUnitPrice” field in the Heartland Ticket Line Item.

Static

ItemLine

Type

The iPaaS Transaction ItemLine is added to the “Type” field in the Heartland Ticket Line Item.

Child Collection: Heartland Ticket Shipping Amount Line Item Add From iPaaS

Mapping Filter

SourceTypeName=="ParentOnly"
&& Parent.ShippingAmount != null
&& Parent.ShippingAmount > 0

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Dynamic Formula

Parent.ShippingAmount

Value

Parent.ShippingAmount refers to the total shipping cost of the parent order. It’s used to access or calculate shipping-related values in the order.

Static

ShippingLine

Type

The iPaaS Transaction ItemLine is added to the “Type” field in the Heartland Ticket Shipping Amount Line Item.

Child Collection: Heartland Ticket Tax Amount Line Item Add From iPaaS

Mapping Filter

SourceTypeName=="ParentOnly"
&& Parent.TaxAmount != null
&& Parent.TaxAmount > 0

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

Imported Tax Amount

Description

The iPaaS Transaction Imported Tax Amount is added to the “Description” field in the Heartland Ticket Tax Amount Line Item.

Dynamic Formula

return null;

Qty

Returns null, indicating that no value is being returned or the result is intentionally empty.

Dynamic Formula

return true;

ManuallyAdded

Returns true, meaning the condition succeeded or the operation completed successfully.

Dynamic Formula

Parent.TaxAmount

Value

Parent.TaxAmount represents the total tax amount from the parent order. It’s used to reference or calculate taxes applied to the entire order.

Static

TextLine

Type

The iPaaS Transaction ItemLine is added to the “ Type” field in the Heartland Ticket Tax Amount Line Item.

Child Collection: Heartland Ticket Note Add From iPaaS

Mapping Type

Source (iPaaS.com)

Destination (Heartland)

Description

Static

Text

Content

The iPaaS Transaction Text is added to the “Content” field in the Heartland Ticket Add.

Error Handling

Invalid Transaction Type

  • Description: This error occurs when a transaction type other than Order, Invoice, or Ticket is sent in the request.

  • Resolution: Ensure that the Type field contains a valid value (Order, Invoice, or Ticket) before making the API call.

Invoice Creation Not Allowed

  • Description:This error occurs when you try to create an invoice for a transaction that is either not in Open status or is a Ticket type.

  • Resolution: Check that the source Sales Order exists and that the Sales Order status is Open and the transaction type is not Ticket.

Line Item Creation Failure

  • Description: This error occurs when transaction line items fail to create or update during Order, Invoice, or Ticket processing.

  • Resolution: Validate that each line item has a valid ItemId, quantity, and pricing before submitting the transaction.

CustomerId Not Found

  • Description: This error occurs when a billing or shipping address cannot be created or updated for a Sales Order.

  • Resolution: Ensure customer exists and address data is complete before syncing.

Testing & Validation

Test Scenarios

  1. Invalid Transaction Type: Send a transaction with an unsupported Type. Validation error is returned.

  2. Invoice Without Open Order: Attempt to create an invoice for a closed or non- existent Sales Order. Invoice creation fails with an error.

  3. Invalid Line Item: Send line item with invalid or missing ItemId. Line item creation fails.

Validation Rules

  • Transaction Type must be Order, Invoice, or Ticket.

  • Invoice can only be created if Sales Order status is Open.

  • Line items must have valid ItemId.

  • Custom fields must be mapped correctly before syncing.

Validation Checklist

  • Transaction Type is valid.

  • Sales Order status is Open.

  • Line items are present and valid.

  • Custom fields are populated and mapped properly.

Additional Notes

  • Ensure that mapping filter and all the dynamic formula returns the valid output.

Did this answer your question?