You can create a message format to send an email to you or a specified email address when an online order is placed for a specific customer.
Instructions
Create a new message format
Go to Maintenance > Message Formats. See Message Formats for more information.
Click the New button in the toolbar.
Enter a Format ID and Description.
In the General tab, select “Customer On Demand“ for Message type and enter a Return Email Address.
In the Advanced tab, check the Execute SQL Statement checkbox then enter and edit the following SQL.
DECLARE @ORDERID DECIMAL(19,2) SET @ORDERID = [OrderID] -- IF THIS ORDER WAS CREATED BY EITHER RAPIDSHIP OR XINTERNET IF EXISTS(SELECT * FROM dbo.tblOrder WHERE ORDERID = @ORDERID AND (CSR LIKE 'Rapidship%' OR CSR LIKE 'Inet%')) BEGIN EXEC dbo.spInsertMailOutbox @ReturnEmailAddress = 'email@address.com', -- REPLACE THIS WITH A VALID RETURN EMAIL ADDRESS @ReturnName = 'CXT Software', -- REPLACE THIS WITH A VALID RETURN USERNAME @ToEmail = 'email@address.com', -- REPLACE THIS WITH A VALID TO EMAIL ADDRESS @Subject = 'Online order created for customer [CustID]', -- REPLACE THIS WITH WHAT EVER SUBJECT YOU WANT TO USE @Body = 'An online order, order id [OrderID] was created', -- REPLACE THIS WITH WHATEVER BODY YOU WANT TO USE. CAN USE AVAILABLE FIELDS. @CCEmailAddress = '', @Attachment = NULL, @AttachmentFileName = '' END
Optional. To also send an email to the customer enter the following:
In the General tab, enter a Message Subject.
In the Format tab, enter a message in Message Format.
Click OK or Apply.
Quick Tips
When updating the email addresses, name, subject, and body fields - the content must remain inside the single quotations to execute correctly.
You can use Available Fields in the subject and body.
Apply the message format to the customer
Go to the Maintenance > Customer and select the customer you would like to apply this message format to. See Customers - New/Edit Customer for more information.
Select the Contacts tab.
Under Alerts select the Status Event “Order - Place“ and select the Message Format created above.
You can only have 1 alert per status event.