In Sendwithus the template is king. First you will need to set up a template and then use our templating language (Jinja ) to access the variables passed by Magento. After your template is set up, make sure to associate the Magento action with sending that template.
Sendwithus uses slightly different variable syntax than the Magento system. Below is a full list of data available for a “Order Shipped” email.
The best way to get access to this data is to send a test email from Magento, view the Log for it in Sendwithus (on the “Logs” page), and then click the “data” tab to see what data was sent with the API request.
The following is an example for an “Order Shipped” email.
{
"shipping" : {
"vat_is_valid" : null ,
"updated_at" : "2015-05-08 17:25:03" ,
"customer_address_id" : "1" ,
"fax" : null ,
"company" : null ,
"region_id" : null ,
"vat_id" : null ,
"vat_request_date" : null ,
"email" : "myemail@mycompany.com" ,
"middlename" : null ,
"suffix" : null ,
"prefix" : null ,
"parent_id" : "2275" ,
"city" : "San Francisco" ,
"region" : "San Francisco" ,
"created_at" : "2015-05-08 17:25:03" ,
"telephone" : "1234" ,
"customer_id" : "22" ,
"store_id" : null ,
"vat_request_success" : null ,
"address_type" : "shipping" ,
"lastname" : "MyLastName" ,
"postcode" : "1234" ,
"entity_id" : "4547" ,
"street" : "1234 A Street" ,
"country_id" : "USA" ,
"vat_request_id" : null ,
"firstname" : "MyFirstName"
},
"payment_html" : "<p>this will be a block of HTMl generated by Magento</p>" ,
"order" : {
"cod_tax_amount" : "0.0000" ,
"customer_dob" : null ,
"base_to_global_rate" : "1.0000" ,
"total_due" : null ,
"customer_email" : "myemail@company.com" ,
"real_order_id" : null ,
"customer_suffix" : null ,
"cod_tax_amount_canceled" : null ,
"payment_charge" : null ,
"tracking_numbers" : null ,
"shipping_canceled" : null ,
"grand_total" : "1649.0000" ,
"store_to_order_rate" : "1.0000" ,
"relation_parent_id" : null ,
"subtotal" : "1549.0000" ,
"forced_shipment_with_invoice" : null ,
"total_qty_ordered" : "1.0000" ,
"base_payment_charge" : null ,
"base_cod_fee_invoiced" : null ,
"base_hidden_tax_refunded" : null ,
"customer_gender" : "1" ,
"hidden_tax_invoiced" : null ,
"discount_amount" : "0.0000" ,
"base_to_order_rate" : "1.0000" ,
"base_discount_invoiced" : null ,
"forced_do_shipment_with_invoice" : null ,
"cod_fee_invoiced" : null ,
"ebizmarts_abandonedcart_flag" : null ,
"applied_rule_ids" : null ,
"base_subtotal_refunded" : null ,
"total_online_refunded" : null ,
"store_name" : "My Store" ,
"customer_is_guest" : "0" ,
"shipping_refunded" : null ,
"base_shipping_tax_refunded" : null ,
"base_cod_tax_amount" : "0.0000" ,
"hidden_tax_refunded" : null ,
"entity_id" : "1" ,
"base_extracharge_amount_refunded" : "0.00" ,
"adjustment_negative" : null ,
"discount_description" : null ,
"custbalance_amount" : null ,
"tax_invoiced" : null ,
"customer_taxvat" : null ,
"quote_id" : "1" ,
"relation_parent_real_id" : null ,
"shipping_invoiced" : null ,
"customer_note" : null ,
"customer_middlename" : null ,
"can_ship_partially_item" : null ,
"shipping_description" : "Shipment via FedEx (Estimated Dispatch time 4 - 7 Days) - Free Shipping" ,
"base_total_online_refunded" : null ,
"gift_message_id" : null ,
"extracharge_amount_refunded" : "0.00" ,
"base_shipping_canceled" : null ,
"total_canceled" : null ,
"total_item_count" : "1" ,
"increment_id" : "1432016213" ,
"hold_before_state" : null ,
"quote_address_id" : null ,
"shipping_address_id" : "4547" ,
"base_cod_tax_amount_canceled" : null ,
"extracharge_amount_invoiced" : "0.00" ,
"shipping_incl_tax" : "0.0000" ,
"base_shipping_refunded" : null ,
"total_invoiced" : null ,
"base_total_qty_ordered" : null ,
"ebizmarts_magemonkey_campaign_id" : null ,
"currency_code" : null ,
"can_ship_partially" : null ,
"extracharge_amount" : "0.00" ,
"base_cod_tax_amount_invoiced" : null ,
"payment_authorization_amount" : null ,
"base_cod_fee_canceled" : null ,
"base_cod_fee_refunded" : null ,
"order_currency_code" : "USD" ,
"shipping_amount" : "0.0000" ,
"base_subtotal_incl_tax" : "1549.0000" ,
"x_forwarded_for" : null ,
"edit_increment" : null ,
"customer_lastname" : "MyLastName" ,
"base_total_offline_refunded" : null ,
"base_discount_canceled" : null ,
"billing_address_id" : "4546" ,
"cod_fee_canceled" : null ,
"discount_invoiced" : null ,
"cod_fee_refunded" : null ,
"subtotal_invoiced" : null ,
"payment_authorization_expiration" : null ,
"customer_firstname" : "MyFirstName" ,
"base_shipping_amount" : "0.0000" ,
"base_shipping_hidden_tax_amount" : "0.0000" ,
"base_extracharge_amount" : "0.00" ,
"ext_order_id" : null ,
"currency_rate" : null ,
"ext_customer_id" : null ,
"hold_before_status" : null ,
"base_cod_tax_amount_refunded" : null ,
"is_virtual" : "0" ,
"tax_canceled" : null ,
"shipping_tax_amount" : "0.0000" ,
"customer_note_notify" : "1" ,
"remote_ip" : "122.177.29.212" ,
"email_sent" : false ,
"base_adjustment_negative" : null ,
"cod_tax_amount_invoiced" : null ,
"base_total_invoiced" : null ,
"kr_reference_id" : "3569202413" ,
"discount_canceled" : null ,
"base_shipping_invoiced" : null ,
"updated_at" : "2015-05-08 17:25:12" ,
"base_total_invoiced_cost" : null ,
"created_at" : "2015-05-08 17:25:03" ,
"base_total_paid" : null ,
"subtotal_refunded" : null ,
"base_shipping_tax_amount" : "0.0000" ,
"base_tax_invoiced" : null ,
"relation_child_id" : null ,
"total_paid" : null ,
"customer_prefix" : null ,
"tax_refunded" : null ,
"subtotal_incl_tax" : "1549.0000" ,
"shipping_hidden_tax_amount" : "0.0000" ,
"store_id" : "1" ,
"base_shipping_discount_amount" : "0.0000" ,
"base_adjustment_positive" : null ,
"cod_fee" : "100.0000" ,
"shipping_method" : "freeshipping_freeshipping" ,
"base_total_canceled" : null ,
"adjustment_positive" : null ,
"base_hidden_tax_amount" : "0.0000" ,
"store_currency_code" : "USD" ,
"base_currency_code" : "USD" ,
"base_hidden_tax_invoiced" : null ,
"base_grand_total" : "1649.0000" ,
"protect_code" : "1a1" ,
"base_tax_canceled" : null ,
"base_custbalance_amount" : null ,
"customer_id" : "22" ,
"subtotal_canceled" : null ,
"tax_percent" : null ,
"base_tax_amount" : "0.0000" ,
"customer_group_id" : "1" ,
"base_total_due" : null ,
"base_subtotal" : "1549.0000" ,
"original_increment_id" : null ,
"total_offline_refunded" : null ,
"state" : "new" ,
"coupon_rule_name" : null ,
"base_extracharge_amount_invoiced" : "0.00" ,
"cod_tax_amount_refunded" : null ,
"relation_child_real_id" : null ,
"is_multi_payment" : null ,
"paypal_ipn_customer_notified" : null ,
"base_discount_amount" : "0.0000" ,
"global_currency_code" : "INR" ,
"shipping_tax_refunded" : null ,
"base_shipping_hidden_tax_amnt" : "0.0000" ,
"base_subtotal_invoiced" : null ,
"is_hold" : null ,
"currency_base_id" : null ,
"base_subtotal_canceled" : null ,
"base_total_refunded" : null ,
"status" : "pending" ,
"base_discount_refunded" : null ,
"discount_refunded" : null ,
"total_refunded" : null ,
"tax_amount" : "0.0000" ,
"base_tax_refunded" : null ,
"payment_auth_expiration" : null ,
"coupon_code" : null ,
"hidden_tax_amount" : "0.0000" ,
"shipping_discount_amount" : "0.0000" ,
"base_cod_fee" : "100.0000" ,
"weight" : "500.0000" ,
"base_shipping_incl_tax" : "0.0000" ,
"store_to_base_rate" : "1.0000"
},
"billing" : {
"vat_is_valid" : null ,
"updated_at" : "2015-05-08 17:25:03" ,
"customer_address_id" : "1" ,
"fax" : null ,
"company" : null ,
"region_id" : null ,
"vat_id" : null ,
"vat_request_date" : null ,
"email" : "myemail@company.com" ,
"middlename" : null ,
"suffix" : null ,
"prefix" : null ,
"parent_id" : "1" ,
"city" : "San Francisco" ,
"region" : "San Francisco" ,
"created_at" : "2015-05-08 17:25:03" ,
"telephone" : "9654583564" ,
"customer_id" : "1" ,
"store_id" : null ,
"vat_request_success" : null ,
"address_type" : "billing" ,
"lastname" : "MYLastName" ,
"postcode" : "1234" ,
"entity_id" : "4546" ,
"street" : "1234 A Street" ,
"country_id" : "IN" ,
"vat_request_id" : null ,
"firstname" : "FirstName"
},
"order_items" : [
{
"base_price_incl_tax" : 1549 ,
"is_virtual" : "0" ,
"gift_message_available" : "0" ,
"is_qty_decimal" : "0" ,
"gift_message_id" : null ,
"row_weight" : 500 ,
"base_row_total_incl_tax" : 1549 ,
"base_tax_amount" : 0 ,
"is_recurring" : "0" ,
"base_weee_tax_applied_row_amnt" : 0 ,
"discount_percent" : 0 ,
"weee_tax_applied_amount" : 0 ,
"original_price" : 1549 ,
"tax_percent" : 0 ,
"product_type" : "simple" ,
"is_nominal" : 0 ,
"updated_at" : "2015-05-08 17:25:03" ,
"tax_before_discount" : null ,
"base_tax_before_discount" : null ,
"qty_ordered" : 1 ,
"name" : "Name of item" ,
"created_at" : "2015-05-08 17:25:03" ,
"product_id" : "658" ,
"applied_rule_ids" : "" ,
"base_discount_amount" : 0 ,
"product" : {},
"base_cost" : null ,
"price_incl_tax" : 1549 ,
"weee_tax_applied_row_amount" : 0 ,
"order_id" : "2275" ,
"quote_parent_item_id" : null ,
"store_id" : "1" ,
"row_total" : 1549 ,
"weee_tax_disposition" : 0 ,
"item_id" : "2822" ,
"additional_data" : null ,
"base_weee_tax_applied_row_amount" : 0 ,
"row_total_incl_tax" : 1549 ,
"description" : null ,
"tax_amount" : 0 ,
"base_weee_tax_disposition" : 0 ,
"base_weee_tax_applied_amount" : 0 ,
"discount_amount" : 0 ,
"weee_tax_applied" : "a:0:{}" ,
"base_weee_tax_row_disposition" : 0 ,
"base_hidden_tax_amount" : 0 ,
"product_options" : {
"info_buyRequest" : {
"isCart" : "0" ,
"qty" : "1" ,
"related_product" : "" ,
"options" : {
"1149" : "3573" ,
"1076" : "3345" ,
"1077" : "3350"
},
"uenc" : "1234," ,
"form_key" : "1235aaa" ,
"product" : "658"
},
"options" : [
{
"custom_view" : false ,
"value" : "XX-Large" ,
"option_id" : "1076" ,
"print_value" : "XX-Large" ,
"option_value" : "3345" ,
"option_type" : "drop_down" ,
"label" : "Girls"
},
{
"custom_view" : false ,
"value" : "XX-Large" ,
"option_id" : "1077" ,
"print_value" : "XX-Large" ,
"option_value" : "3350" ,
"option_type" : "drop_down" ,
"label" : "Guys"
},
{
"custom_view" : false ,
"value" : "Navy Blue" ,
"option_id" : "1149" ,
"print_value" : "Navy Blue" ,
"option_value" : "3573" ,
"option_type" : "drop_down" ,
"label" : "Color"
}
]
},
"sku" : "1234" ,
"base_original_price" : 1549 ,
"hidden_tax_amount" : 0 ,
"price" : 1549 ,
"weee_tax_row_disposition" : 0 ,
"qty_backordered" : null ,
"tax_string" : null ,
"base_price" : 1549 ,
"quote_item_id" : "9635" ,
"weight" : "500.0000" ,
"base_row_total" : 1549
}
],
"magento_action" : "1" ,
"store" : {
"do_not_round_et" : false ,
"available_currency_codes" : [
"USD"
],
"sort_order" : "0" ,
"base_currency" : {
"currency_code" : "USD"
},
"store_id" : "1" ,
"code" : "default" ,
"url" : "http://www.mystore.com/" ,
"name" : "English" ,
"website_id" : "1" ,
"group_id" : "1" ,
"is_active" : "1" ,
"current_currency" : {
"currency_code" : "INR"
},
"frontName" : "My Store"
}
}