Emailing Tracking Numbers

Nov 27, 2006 1 Replies

I have integrated a website with RMS. When orders come in, I make them a workorder and send a PO to the distributor that will ship the product. At the end of the day, the distrbutor sends me the tracking number. When I bring up the customers workorder and enter the tracking number, I then complete the transcation, then press Shift/Control/F8 to mark the order processed. This should email the tracking number to the customer in the Thank You email.


---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane.



formatting link


Hey Bill,

play with this on a rainy day - TRY ON A TEST DATABASE FIRST!!

all you have to do is add this stored procedure to your db

formatting link
and modify the parameters to match the email account you want it sent through - easy to figure out after you read through the article and SP code. Then add an update trigger, like the one below **NOT TESTED** to the shipping table to fire when the status field is updated.

I have done something similar and it works GREAT!

CREATE TRIGGER EMailTracking ON Shipping FOR UPDATE AS DECLARE @Body varchar(255) DECLARE @CustomerEmailAddress varchar(255) DECLARE @SendTrackingNumber varchar(255) IF UPDATE (status) BEGIN SELECT @CustomerEmailAddress = EmailAddress, @SendTrackingNumber TrackingNumber FROM inserted SET @Body = 'Here it the tracking number for your order: '+@SendTrackingNumber exec sp_send_cdosysmail ' snipped-for-privacy@mydomain.com',@CustomerEmailAddress,'Tracking Number for your Order',@Body END GO

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required