Channel Advisor WebServices Plugin/Documentation
Channel Advisor WebServices Plugin User Guide
Integrates FileMaker with ChannelAdvisor.
Related Links
<a href="http://developer.channeladvisor.com/display/cadn/FAQ">http://developer.channeladvisor.com/display/cadn/FAQ</a>
360Works Plugin Setup Guides
See Plugins_101 for Error reporting, installation, registration, and more.
Function Summary
- CHA_AddInventoryImage ( placementName ; filenameOrUrl { ; folderName } ) — Adds an image to the most recently added inventory item, as sent to CHA_InventorySyncAdd.
- CHA_AddMarketplaceAdForSkuList ( developerKey ; password ; accountId ; skuList { ; key1=value1 ; key2=value2 ; ... } ) — Creates a new Marketplace Ad for each SKU provided in the parameter array.
- CHA_CarrierList ( developerKey ; password ; accountId ) —
- CHA_CarrierValue ( key ) — Gets a carrier value for the current carrier, as set by {@link #CHA_NextCarrier}.
- CHA_DeleteInventory ( developerKey ; password ; accountId ; sku ) — Deletes an inventory item from ChannelAdvisor.
- CHA_DeleteMarketplaceAd ( developerKey ; password ; accountId ; marketplaceAdId ) —
- CHA_GetClassificationConfigurationInformation ( developerKey ; password ; accountId ) — Fetch all classification user-defined fields for an account.
- CHA_InventoryList ( developerKey ; password ; accountID ; filter1=value1 ; filter2=value2 ; ... ) — Fetches inventory from the ChannelAdvisor server.
- CHA_InventorySyncAdd ( sku { ; key1=value1 ; key2=value2 ; ... ) — Add an inventory item to the current sync batch.
- CHA_InventorySyncBegin ( ) — Call this before beginning the inventory synchronization process.
- CHA_InventorySyncClassificationInfo ( name ; value ) — Sets a single classification attribute on the most recently added inventory item created via CHA_InventorySyncAdd.
- CHA_InventorySyncCommit ( developerKey ; password ; accountId ) — Commits any inventory items in the current sync batch.
- CHA_InventoryValue ( key ) —
- CHA_LastError ( ) — Returns the last CHA_-related error which occurred.
- CHA_LicenseInfo ( ) — Returns information about the license used.
- CHA_LineItemValue ( key ) — Gets a line item value for the currently iterated line item, as set by {@link #CHA_NextLineItem}.
- CHA_NextCarrier ( ) —
- CHA_NextInventory ( ) —
- CHA_NextLineItem ( ) — Iterates to the next line item for the current order.
- CHA_NextOrder ( ) — Iterate to the next order fetched with {@link #CHA_OrderList}.
- CHA_OrderList ( developerKey ; password ; accountID { ; filter1=value1 ; filter2=value2 ; ... ) — Fetches orders from the ChannelAdvisor server.
- CHA_OrderShipped ( developerKey ; password ; accountID ; orderID ; dateShipped ; carrierCode ; classCode ; trackingNumber ) — Marks an existing order with a status of shipped.
- CHA_OrderValue ( key ) — Gets an order value from the current order, as set by {@link #CHA_NextOrder}.
- CHA_Ping ( developerKey ; password ) — This should be the first method you use when you connect to any service, to make sure that your connectivity and credentials are working properly.
- CHA_Register ( licenseKey ; registeredTo ) — Registers the plugin.
- CHA_SetErrorCapture ( errorCapture ) —
- CHA_Version ( ) — Returns the version of the plugin which is installed.
Function Detail
CHA_AddInventoryImage ( placementName ; filenameOrUrl { ; folderName } )
Adds an image to the most recently added inventory item, as sent to CHA_InventorySyncAdd. You must add the inventory item, then call this method to add the image for that item
placementName
- Specifies the Image Placement for this Image when associating with the Inventory Item (required). This is typically one of: top, bottom, left, right
filenameOrUrl
- Specifies the source of the Image (required). Specifying a simple Filename assumes that you will OR have already uploaded the specified Image into your Account
folderName
- Specifies the Image Folder to associate with this Image (optional)
CHA_AddMarketplaceAdForSkuList ( developerKey ; password ; accountId ; skuList { ; key1=value1 ; key2=value2 ; ... } )
Creates a new Marketplace Ad for each SKU provided in the parameter array.
This returns a list of skus, followed by the numeric identifier of the newly created marketplace ad. For example:
sku12344:8650952 sku12347:8650953 sku12348:8650959 etc...
If any skus are not successfully uploaded, you can get a list of the skus and their error messages by calling CHA_LastError. This will return a list of skus and error messages, for example:
sku12345:Unknown sku sku12346:Marketplace ad denied for some reason sku12323:Unknown sku etc...
You can specify additional parameters with the following keys:
- postingTemplate
- adTemplate
- schedule
- flagstyle: one of "blueflag", "exclamationpoint", "greenflag", "noflag", "notavailable", "price", "questionmark", "redflag", "yellowflag"
- flagDescription
- primaryCategory: If the associated Posting Template already has a Primary Category specified, then this property will be defaulted to that value.
- secondaryCategory: If the associated Posting Template already has a Primary Category specified, then this property will be defaulted to that value.
- primaryStoreCategory: If the associated Posting Template already has a Primary Category specified, then this property will be defaulted to that value.
- secondaryStoreCategory: If the associated Posting Template already has a Primary Category specified, then this property will be defaulted to that value.
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountID
- The accountID to create ads for
skuList
- a return-separated list of SKus
keyValuePairs
- additional parameters
CHA_CarrierList ( developerKey ; password ; accountId )
CHA_CarrierValue ( key )
Gets a carrier value for the current carrier, as set by CHA_NextCarrier.
key
must be one of the following values:
- carrierId: Numeric identifier for a shipping carrier
- classId: Numeric identifier for a shipping carrier class
- carrierName: Name for a carrier
- carrierCode: String identifier for a carrier. This is used in other shipping api calls to identify a carrier.
- classCode: String identifier for a carrier class. This is used in shipping api calls to identify a carrier class.
- className: Name for a carrier class.
key
- name of the property to retrieve from the current carrier.
key
field for the current carrier. Returns "ERROR" on error (use the CHA_LastError function to get a detailed error message).
CHA_DeleteInventory ( developerKey ; password ; accountId ; sku )
Deletes an inventory item from ChannelAdvisor.
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountId
- The accountId to delete inventory from
sku
- The sku being deleted
CHA_DeleteMarketplaceAd ( developerKey ; password ; accountId ; marketplaceAdId )
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountID
- A unique identifier representing the ChannelAdvisor account you wish to access.
marketplaceAdId
- The unique identifier for the Marketplace Ad returned when the Ad was created.
CHA_GetClassificationConfigurationInformation ( developerKey ; password ; accountId )
Fetch all classification user-defined fields for an account. This returns a return-separated list of classification names, followed by attribute names. classification names after the first are prefaced by an empty line. For example:
class1 attr1 attr2 attr3 class2 attrA attrB attrC class3 etc...
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountID
- Your ChannelAdvisor account ID
CHA_InventoryList ( developerKey ; password ; accountID ; filter1=value1 ; filter2=value2 ; ... )
Fetches inventory from the ChannelAdvisor server. You can specify optional filters with the following keys:
- dateRangeField: Either "createdate" or "lastupdatedate" - Specifies the Date Field property of an Inventory Item to filter on. MUST be set in order to use the DateRangeStartGMT and DateRangeEndGMT fields.
- dateRangeStartGMT
- dateRangeEndGMT
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountID
- Your ChannelAdvisor account ID
filters
- key=value filter options
CHA_InventorySyncAdd ( sku { ; key1=value1 ; key2=value2 ; ... )
Add an inventory item to the current sync batch. The following are the valid key values for the optional inventory arguments (see http://developer.channeladvisor.com/display/cadn/InventoryItemSubmit for descriptions):
- title: The title specified here will be used as the title for any ads you create for this inventory item.
- subtitle: This field can be used as subtitle in the store or in any ads you create for this inventory item.
- shortdescription: The short description is used to describe items in the Upsell portion of the ChannelAdvisor Checkout. Depending on the Search Layout, it can also appear in the search results page of your ChannelAdvisor store. This description should be limited to 1000 characters.
- description: The description field may contain information use to describe the inventory item when it is posted to the marketplace.
- metadescription: Use this field to provide the description for the item that will appear in the description meta tag on the item detail page in the store. If this field is left blank, the first 200 characters of the store description will be used. Search engine crawlers look at the description meta tag to understand the meaning of that page.
- weight (should be a decimal number with no unit of measure): Enter the weight of this item. This weight will be used to calculate shipping costs if you are using the Third Party Shipping Calculator in your ads or for the Checkout.
- suppliercode
- warehouselocation: Identify the physical location of an item inside your company warehouse. This code is generally made up of an aisle, shelf or bin drawer location.
- taxproductcode
- flagtype: one of "blueflag", "exclamationpoint", "greenflag", "noflag", "notavailable", "price", "questionmark", "redflag", "yellowflag"
- flagdescription
- blocked
- blockcomment
- qty: The quantity should indicate the total number of units available for sale for this item.
- cost
- retailprice
- startingprice
- reserveprice
- takeitprice
- secondchanceofferprice: the Second Chance Offer Price field will be used when the Automatic Second Chance Offer feature is enabled in the Sales Settings.
- storeprice
- isinrelationship
- relationshipname
- isparent
- parentsku
- displayinstore
- storetitle
- storedescription
- categoryid
- distributioncentercode: Select the location where this item will be shipped from when it is sent to the buyer.
- classification: Specifies the name of the Inventory Item Classification to associate with the Inventory Item. If the specified Classification does NOT exist, it WILL BE CREATED.
sku
- The SKU (Stock Keeping Unit) is a unique identifier that is associated with a product for inventory tracking purposes.
array
- key=value pairs for the given inventory item
CHA_InventorySyncBegin ( )
Call this before beginning the inventory synchronization process.
CHA_InventorySyncClassificationInfo ( name ; value )
Sets a single classification attribute on the most recently added inventory item created via CHA_InventorySyncAdd. The call to CHA_InventorySyncAdd must have included a classification name for this function to work correctly.
name
- the classification attribute name.
value
- the classification attribute value.
CHA_InventorySyncCommit ( developerKey ; password ; accountId )
Commits any inventory items in the current sync batch.
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountId
- Your ChannelAdvisor account id
CHA_InventoryValue ( key )
CHA_LastError ( )
Returns the last CHA_-related error which occurred. This should be called any time that a plugin function returns "ERROR" to get a user-readable description of the error.
""
if there was no error.
CHA_LicenseInfo ( )
Returns information about the license used.
CHA_LineItemValue ( key )
Gets a line item value for the currently iterated line item, as set by CHA_NextLineItem.
key
must be one of the following values:
- LineItemType
- UnitPrice
- LineItemID
- AllowNegativeQuantity
- Quantity
- ItemSaleSource
- SKU
- Title
- BuyerUserID
- BuyerFeedbackRating
- SalesSourceID
- VATRate
- UnitWeight: this includes the unit of measure
- WarehouseLocation
key
- name of the property to retrieve from the current line item.
key
property for the current line item.
CHA_NextCarrier ( )
CHA_NextInventory ( )
CHA_NextLineItem ( )
Iterates to the next line item for the current order. Note: this returns both line items and promos. Check the "type" of the line item to determine whether it's a promo or a regular line item or promo (type="Promotion").
CHA_NextOrder ( )
Iterate to the next order fetched with CHA_OrderList.
CHA_OrderList ( developerKey ; password ; accountID { ; filter1=value1 ; filter2=value2 ; ... )
Fetches orders from the ChannelAdvisor server. You can specify optional filters with the following keys:
- checkoutstatuscode: one of "NoChange", "NotVisited", "Completed", "Visited", "Cancelled", "CompletedOffline", "OnHold"
- exportstate: one of "Unknown", "NotExported"
- ordercreationfilterbegintime: Only return orders created on or after this date and time
- ordercreationfilterendtime: Only return orders created on or before this date and time
- orderids: a comma-separated list of order ids
- orderstate: one of "Active", "Archived", "Cancelled"
- paymentstatus: one of "NoChange", "NotSubmitted", "Cleared", "Submitted", "Failed", "Deposited"
- shippingstatus: one of "NoChange", "Unshipped", "Shipped", "PartiallyShipped"
- statusupdatefilterbegintime: Only return orders whose status was set after this date and time
- statusupdatefilterendtime: Only return orders whose status was set before this date and time
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountID
- Your ChannelAdvisor account ID
filters
- key=value filter options
CHA_OrderShipped ( developerKey ; password ; accountID ; orderID ; dateShipped ; carrierCode ; classCode ; trackingNumber )
Marks an existing order with a status of shipped.
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
accountID
- the accountId of the channelAdvisor account
orderID
- the order ID being shipped
dateShipped
- the date of shipment
carrierCode
- the carrier code
classCode
- the class code
trackingNumber
- the tracking number
CHA_OrderValue ( key )
Gets an order value from the current order, as set by CHA_NextOrder.
key
must be one of the following values:
- NumberOfMatches
- OrderTimeGMT
- LastUpdateDate
- TotalOrderAmount
- OrderState
- DateCancelledGMT
- OrderID
- ClientOrderIdentifier
- OrderStatus.CheckoutStatus
- OrderStatus.CheckoutDateGMT
- OrderStatus.PaymentStatus
- OrderStatus.PaymentDateGMT
- OrderStatus.ShippingStatus
- OrderStatus.ShippingDateGMT
- ResellerID
- BuyerEmailAddress
- EmailOptIn
- PaymentInfo.PaymentType
- PaymentInfo.CreditCardLast4
- PaymentInfo.PaypalID
- PaymentInfo.MerchantReferenceNumber
- PaymentInfo.PaypalTransactionID
- ShippingInfo.ShipmentInstructions
- ShippingInfo.ShipmentList: returns a return-separated list of shipments. Each line contains the carrier followed by a space, then the shipping code, then a colon, then the tracking number.
- BillingInfo.CompanyName
- BillingInfo.Title
- BillingInfo.FirstName
- BillingInfo.LastName
- BillingInfo.Suffix
- BillingInfo.PhoneNumberDay
- BillingInfo.PhoneNumberEvening
- BillingInfo.AddressLine1
- BillingInfo.AddressLine2
- BillingInfo.City
- BillingInfo.Region
- BillingInfo.PostalCode
- BillingInfo.CountryCode
- ShippingInfo.CompanyName
- ShippingInfo.Title
- ShippingInfo.FirstName
- ShippingInfo.LastName
- ShippingInfo.Suffix
- ShippingInfo.PhoneNumberDay
- ShippingInfo.PhoneNumberEvening
- ShippingInfo.AddressLine1
- ShippingInfo.AddressLine2
- ShippingInfo.City
- ShippingInfo.Region
- ShippingInfo.PostalCode
- ShippingInfo.CountryCode
- ShippingInfo.CompanyName
- ShippingInfo.Title
- ShippingInfo.FirstName
- ShippingInfo.LastName
- ShippingInfo.Suffix
- ShippingInfo.PhoneNumberDay
- ShippingInfo.PhoneNumberEvening
- ShippingInfo.AddressLine1
- ShippingInfo.AddressLine2
- ShippingInfo.City
- ShippingInfo.Region
- ShippingInfo.PostalCode
- ShippingInfo.CountryCode
- ShoppingCart.CartID
- ShoppingCart.CheckoutSource
- ShoppingCart.VATTaxCalculationOption
- ShoppingCart.VATShippingOption
key
- name of the property to retrieve from the current order
key
field. Returns "ERROR" on error (use the CHA_LastError function to get a detailed error message).
CHA_Ping ( developerKey ; password )
This should be the first method you use when you connect to any service, to make sure that your connectivity and credentials are working properly.
developerKey
- Your ChannelAdvisor developer key
password
- Your ChannelAdvisor password
CHA_Register ( licenseKey ; registeredTo )
Registers the plugin.
licenseKey
- a valid license key
registeredTo
- the company the plugin is registered to
"ERROR"
on failure.
CHA_SetErrorCapture ( errorCapture )
CHA_Version ( )
Returns the version of the plugin which is installed.