Page 1 of 1

Triggering emails for status updates

Posted: Mon Aug 31, 2009 10:49 am
by WylieE
We use both UPS WorldShip and USPS Dazzle/Galaxy Ship for shipping. Shipping data, including tracking information, is captured and reconciled with our internal office systems. I've got code in place that updates our AC orders, but it isn't triggering the order shipped email when an order is completed. I don't see any db triggers or SPs, so I'm presuming there's server side code triggering the emails that I'm missing.

Here are the fields we're updating/inserting:
ac_ordershipments - ShipDate
ac_orders - orderstatusID, shipmentstatusID
ac_trackingnumbers - ordershipmentID, shipgatewayID, trackingnumberdata

It would be great if we could automatically notify our customers with their shipping status. If we went through and manually marked the orders shipped, AC would handle this just fine, but we cannot do that with the number of orders we ship.

Some may recommend Shipper, but it doesn't make sense to go out and buy another product, when so much of what we need is already in place with our other systems. (No offense meant in any way to the Shipper developer. Sorry, I'm blanking on his name.)

There must be another update I'm missing or a code fragment that needs to be triggered in order to fire off the emails. Has anyone else worked through this and what am I missing?

Thank you very much.

Re: Triggering emails for status updates

Posted: Mon Aug 31, 2009 2:55 pm
by nickc
I'm pushing response files from our fulfillment agent into Able via a webservice that pretty much just makes sure the order, shipment, payment exists, calls the appropriate Able method (Payment.Capture()/Shipment.Ship(), etc.), then updates state if necessary. All of the expected triggers fire. I know there's some examples here in the forum for instantiating Able's Token object outside of HttpContext so you can take a more direct route to their methods - I chose webservice route anticipating that at some point I might allow 3rd parties to have more direct interaction.

Re: Triggering emails for status updates

Posted: Mon Aug 31, 2009 6:34 pm
by afm
Shipment.Ship() is what triggers the email. For example,

Code: Select all

shipment.Ship(DateTime.Today, !string.IsNullOrEmpty(shipment.Order.GoogleOrderNumber)); 
Pass true for the second parameter if you want AC to send the ship notification to Google Checkout as well.
No offense meant ...
No offense taken.