Skip to main content
How-to

Channel Partner API - Spreadsheet Import

The spreadsheet import interface for the generic channel partner is intended to allow importing of complete orders from a spreadsheet. There are two methods of processing the spreadsheet:

  1. Uploading it through the web interface, or
  2. FTPing the file to UltraCart's Virtual FTP server

Irregardless of which way you send the file to UltraCart, the format of the file is the same. In this tutorial we will cover building the file first and then uploading it.

Configuring the Custom Channel Partner

The first thing that needs to happen before you can import orders is to configure the custom channel partner. Channel partners are how UltraCart keeps track of orders that originate from a source other than the UltraCart checkout process. To configure your channel partner go to:

At the 1st screen click the new button.

![Custom Channel Partner start screen.png](pathname:///confluence/1377246/Custom Channel Partner start screen.png)

There are four text fields and two check boxes to be completed. Also, two check boxes are to be considerd.

![New Custom Channel Partner.png](pathname:///confluence/1377246/New Custom Channel Partner.png)

API Credentials

The following are brief descriptions of the fields.

FieldDescriptionRequired
CodeA 1-10 character code identifying the channel partner. We recommend using the initials of the partner as this will be visible when viewing orders within UltraCartY
NameThe descriptive name of the channel partner.Y
API/FTP PasswordCreate a strong password. This will be the same password used for the API (SOAP or HTTP) as well as the FTP interface.Y
Email FTP File Processing Reports ToThe email address to send processing reports. You can specify multiple emails separated by a comma.Y

Building the Spreadsheet

UltraCart will support three different formats for the spreadsheet:

The first row of the spreadsheet must contain headers. The headers need to come from the table below.

Acceptable values for boolean parameters:

info

true: true, TRUE, yes, YES, on, ON, y, Y, 1
false false, FALSE, no, NO, off, OFF, n, N, 0

Header NameAlternate Header NameFormatDescriptionRequired
order.channelPartnerOrderIdStringA unique order ID from the external system.Y
order.paymentMethodStringThe method of payment. Credit Card or Purchase OrderY
order.noRealtimePaymentProcessingBooleanLeaves the order in Accounts Receivable instead of processing the card in real-time.
order.skipPaymentProcessingBooleanSkip over the payment processing and move the order on to shipping.
order.considerRecurringBooleanIf set to true, then we will pass the recurring flag to the gateways that support it (Authorize.Net and PayPal Web Payments Pro)
order.autoApprovePurchaseOrderBooleanAutomatically approve the purchase order.
order.storeIfPaymentDeclinesBooleanStore the order in Accounts Receivable if the credit card declinesRecommend - Y
order.treatWarningsAsErrorsBooleanTreat warnings (like the pre-oder warning) as errors that prevent the order from importingDefaults to Y
order.storeCompletedBooleanStore the order in the completed orders stage of the system. This is used for importing historical orders from other carts.
order.creditCardAuthorizationReferenceNumberStringIf you authorized the order outside of UltraCart, this is the transaction identifier that UltraCart will use to capture the order.
order.creditCardAuthorizationAmountNumberIf you authorized the order outside of UltraCart, this is the amount of the authorization.
order.creditCardAuthorizationDtsTimestampIf you authorized the order outside of UltraCart, this is the timestamp of the authorization.** Required format: MM/DD/YYYY HH:MM:SS Example ** 07/01/2014 14:23:32 Required format: MM/DD/YYYY HH:MM:SSExample: ** 07/01/2014 14:23:32**
order.creditCardTypeStringVisa, MasterCard, AMEX, or DiscoverY - CC Orders
order.creditCardNumberString15 or 16 digit credit card number (spaces or dashes OK)Y - CC Orders
order.creditCardTokenStringToken of the credit card (Stripe.com or other tokenizing gateway supported by UltraCart).
order.creditCardExpirationMonthNumberMonth 1 through 12 (January = 1, December = 12)Y - CC Orders
order.creditCardExpirationYearNumberFour Digit YearY - CC Orders
order.creditCardExpirationMonthYearStringThe format MM/YY or MM/YYYY
order.creditCardVerificationNumberNumber
order.rotatingTransactionGatewayCodeStringThe rotating transaction gateway code to use for this order.
order.purchaseOrderNumberStringThe purchase order number.Y- Purchase Order
order.billToFirstNameStringY
order.billToLastNameStringY
order.billToTitleString
order.billToCompanyString
order.billToAddress1StringY
order.billToAddress2String
order.billToCityStringY
order.billToStateStringY
order.billToPostalCodeStringY
order.billToCountryStringUse the full spelling that UltraCart uses or provide the ISO-3166 two letter country code.Y
order.billToDayPhoneString
order.billToEveningPhoneString
order.emailString
order.ccEmailString
order.associatedWithCustomerProfileIfPresentStringIf this is yes, the order will be associated with the customer profile that has the same email (if it exists) and they will receive their discounted pricing.
order.shipToFirstNameStringY - physical goods
order.shipToLastNameStringY - physical goods
order.shipToTitleString
order.shipToCompanyString
order.shipToAddress1StringY - physical goods
order.shipToAddress2String
order.shipToCityStringY - physical goods
order.shipToStateStringY - physical goods
order.shipToPostalCodeStringY - physical goods
order.shipToCountryStringUse the full spelling that UltraCart uses or provide the ISO-3166 two letter country code.Y - physical goods
order.shipToPhoneStringY - physical goods
order.shipToEveningPhoneString
order.shippingMethodStringIf the order requires shipping then you either need to specify the name of the method in this field, or pass order.leastCostRoute = true and let UltraCart pick the method of shipmentMaybe
order.arbitraryTaxNumberThe tax charged by the external system
order.arbitraryTaxableSubtotalNumberThe taxable subtotal the tax was based upon by the external system
order.arbitraryTaxRateNumberThe tax rate used by the external system
order.arbitraryShippingHandlingTotalNumberThe shipping/handling cost charged by the external system
order.taxExemptBoolean
order.giftMessageString
order.deliveryDateDateIf specified, use the format MM/DD/YYYY
order.shipOnDateDate
order.ipAddressStringThe IP address of the remote customer (pass 127.0.0.1) if not availableY
order.shipToResidentialBooleanWill default to a business if not specifiedRecommended
order.mailingListOptInBooleanWill default to opted out if not specifiedRecommended
order.specialInstructionsStringSpecial instructions from the customer about shipment
order.screenBrandingThemeCodeStringThe screen branding theme code to associate the order with.Y
order.advertisingSourceString
order.customField1StringCustom value such as the DNIS of the caller up to 50 characters.
order.customField2StringCustom value up to 50 characters.
order.customField3StringCustom value up to 50 characters.
order.customField4StringCustom value up to 50 characters.
order.customField5StringCustom value up to 50 characters.
order.customField6StringCustom value up to 50 characters.
order.customField7StringCustom value up to 50 characters.
order.taxCountyStringTax county name if the state the order is going to charges tax at the county level.
order.affiliateIdStringThe affiliate ID to associate the order with.
order.giftBooleanTrue/False if the order is a gift (defaults to false)
order.giftEmailStringEmail to send the gift receipt to.
order.leastCostRouteBooleanEither this needs to be True or the name of a shipping method must be specified in *order.shippingMethod*Maybe
order.leastCostRouteShippingMethods[#]StringRestrict the least cost routing to these shipping methods.
order.coupons[#]StringCoupons to apply to the order.
order.items[#].itemIdorder.items.itemIdStringItem ID of the itemY
order.items[#].quantityorder.items.quantityIntegerQuantity to purchaseY
order.items[#].arbitraryUnitCostorder.items.arbitraryUnitCostNumberSpecific price for the item.
order.items[#].autoOrderScheduleorder.items.autoOrderScheduleStringAuto order schedule if the item is a customer selectable auto order. Should be one of the following values:
- Weekly
- Every 10 Days
- Biweekly
- Every 24 Days
- Every 28 Days
- Monthly
- Every 45 Days
- Every 2 Months
- Every 3 Months
- Every 4 Months
- Every 6 Months
- Yearly
order.items[#].upsellorder.items.upsellBooleanFlag indicating the item was an upsell (default to false)
order.items[#].autoOrderLastRebillDateorder.items.autoOrderLastRebillDateDateThe last time the order was rebilled. This will determine when the next shipment occurs. This is used for importing historical auto orders from another system. The format for the date is MM/DD/YYYY.Y - if importing historical orders for items that have auto order schedules.
order.items[#].options[#].nameorder.items.options[#].nameStringName of the optionY - if the item has options
order.items[#].options[#].valueorder.items.options[#].valueStringValue of the optionY - if the item has options

Multiple Rows Per Order or Multiple Columns for Items

Order data by it's very nature is multi-dimensional which can be difficult to represent in a spreadsheet. If you are using multiple columns in your spreadsheet to represent the item data you would construct the headers like this:

order.items[0].itemIdorder.items[0].quantityorder.items[1].itemIdorder.items[1].quantity
SHIRT1PANTS1

An optional method is to use multiple rows to represent the items. In this scenario the other non-item data is repeated on all the rows and the item data varies by row. UltraCart will roll up the rows based upon the order.channelPartnerOrderId value.

order.items.itemIdorder.items.quantity
SHIRT1
PANTS1

Channel Partner Uses Different Item SKU?

Not a problem. At the UltraCart Item Management screen, click on the appropriate Item Id. Inside the Item editor click on the Other tab.

![Item editor OTHER.png](pathname:///confluence/1377246/Item editor OTHER.png)

Another set of dark grey Tabs will appear below the Other Tab. Click Channel Partner Item Mapping.

![CP button.png](pathname:///confluence/1377246/CP button.png)

Enter your custom SKU as shown below. UltraCart will transmit the SKU to the UltraCart item ID during the import process.

![Item SKU.png](pathname:///confluence/1377246/Item SKU.png)

Uploading via the Web Interface.

First navigate to:

Click on the "import orders" button as shown below.

![Click import.png](pathname:///confluence/1377246/Click import.png)

On the next screen click the Browse button, navigate within your system and locate the file to be imported. Want all the imported orders marked as "completed"? Click the check box as shown below. Lastly, click the Submit Job button at the bottom.

Submit.png

info

Use this flag if your are importing historical orders. This will keep them from processing payments on those orders.

note

If you import orders associated with items that have an auto order schedule configured, they WILL setup an auto order schedule. This even applies to historical orders if the "Import as completed orders" check box is selected.

Once you submit the job you will be shown a screen informing you that the results will be available soon under the report pickup.

cpsi03.png

Spreadsheet Processing Errors:

ErrorRemediation steps
Invalid column name [order.items[#].itemId]. Please see Channel Partner API -Edit the column header text and replace the # with a number, starting with 0 and adding additional columns for additional items in a single order as described in the section above -> [order.items[0].itemId] (See previous section of this document "Multiple Rows Per Order or Multiple Columns for Items" for more details.)
Invalid column name [order.items[#].quantity]. Please see Channel Partner API -Edit the column header text and replace the # with a number, starting with a 0 and adding in in additional columns for additional items in a single order -> [order.items[0].quantity (See previous section of this document "Multiple Rows Per Order or Multiple Columns for Items" for more details.)

FTPing the File to UltraCart's Virtual FTP Server

You can also FTP the file to the FTP server. To do this connect to:

SettingValue
Servermerchantftp.ultracart.com
Username/
PasswordThe FTP/API password configured for this channel partner.

Once you connect to the server you will see the following folders:

DirectoryMeaning
/import/in/Deposit the spreadsheets into this folder. Once a file is stored it can not be read again, but can be deleted if it was placed there erroneously
/import/out/The processing reports will appear in this folder.

Processing of files occurs once per hour. If you configured the "Email FTP File Processing Reports To" field on the custom channel partner then an email with the processing report will be sent immediately after the processing is complete. This is a good way to keep tabs on the processing from a user perspective.

info

UltraCart will delete any processing reports in the /import/out/ folder older than sixty days.

note

You must transfer the order data over FTP SSL or PGP encrypt the file if you are using FTP. To use PGP encryption make sure you use the UltraCart public PGP key uc-file-transfer-pgp-public-2015.pgp

Processing Reports

The reports produced after processing contain three columns represented in a CSV format. The table below shows an example.

channelPartnerOrderIdultraCartOrderIderror
1000Invalid credit card number.
1000Billing first name not specified.
1001DEMO-00123456
In the example above the channel partner order 1000 produced two errors. The channel partner order 1001 imported successfully as UltraCart order ID DEMO-00123456.
If you upload the spreadsheet via the web interface then you will retrieve the processing report from the report pickup section. If you upload it to the FTP interface then you can retrieve the processing report from /import/out/ on the FTP server.
## Shipment Confirmation
When orders that are imported via the Channel Partner API are shipped, UltraCart automatically produces a shipment confirmation CSV file and places it on the FTP server under /export/shipment/. The format of the CSV file looks like this:
channelPartnerOrderIdultraCartOrderId
channelPartnerOrderIdultraCartOrderIdshippingMethodtrackingNumber
1001DEMO-00123456USPS: Priority Mail1234567890
1002DEMO-00123457USPS: First Class Mail1234567891
1003DEMO-00123458UPS: Ground1Z1234567890
1003DEMO-00123458UPS: Ground1Z1234567891
info

If an order contains multiple tracking numbers then it will appear as multiple rows in the spreadsheet with the same channelPartnerOrderId and ultraCartOrderId.

note

UltraCart will automatically remove shipment confirmations older than 60 days old.

Was this page helpful?