Back to Documentation Overview
campaignEcommAddOrder
public static campaignEcommAddOrder(string apikey, array order)
Attach Ecommerce Order Information to a Campaign. This will generall be used by ecommerce package plugins that we provide or by 3rd part system developers.
- Section:
- Campaign Related
- Parameters:
apikey a valid API Key for your user account. Get by visiting your API dashboard order an array of information pertaining to the order that has completed. Use the following keys: string id the Order Id string campaign_id the Campaign Id to track this order with (see the "mc_cid" query string variable a campaign passes) string email_id the Email Id of the subscriber we should attach this order to (see the "mc_eid" query string variable a campaign passes) double total The Order Total (ie, the full amount the customer ends up paying) string order_date optional - the date of the order - if this is not provided, we will default the date to now double shipping optional - the total paid for Shipping Fees double tax optional - the total tax paid string store_id a unique id for the store sending the order in string store_name optional - a "nice" name for the store - typically the base web address (ie, "store.mailchimp.com"). We will automatically update this if it changes (based on store_id) string plugin_id the MailChimp assigned Plugin Id. Get yours by registering here array items the individual line items for an order using these keys: integer line_num optional - the line number of the item on the order. We will generate these if they are not passed integer product_id the store's internal Id for the product. Lines that do no contain this will be skipped string product_name the product name for the product_id associated with this item. We will auto update these as they change (based on product_id) integer category_id the store's internal Id for the (main) category associated with this product. Our testing has found this to be a "best guess" scenario string category_name the category name for the category_id this product is in. Our testing has found this to be a "best guess" scenario. Our plugins walk the category heirarchy up and send "Root - SubCat1 - SubCat4", etc. double qty the quantity of the item ordered double cost the cost of a single item (ie, not the extended cost of the line) - Returns:
- bool - true if the data is saved, otherwise an error is thrown.
|
Add New Note
User Contributed Notes for
campaignEcommAddOrder |
|---|
| No notes, yet... Will you be the first?? |