Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can create a message format to send an email to you or a specified email address when an onlineorder is placed for a specific customer.

...

Create a new message format

  1. Go to Maintenance > Message Formats. See Message Formats (Classic Operations App) or Message Formats for more information.

  2. Click the New button in the toolbar.

  3. Enter a Format ID and Description.

  4. In the General tab, select “Customer On Demand“ for Message type and enter a Return Email Address.

  5. In the Advanced tab, check the Execute SQL Statement checkbox then enter and edit the following SQL.

    Code Block
    languagesql
    DECLARE @ORDERID DECIMAL(19,2)
    SET @ORDERID = [OrderID]
    
    -- IF THIS ORDER WAS CREATED BY 

...

  1. THE 

...

  1. CLIENT 

...

  1. PORTAL
    IF EXISTS(SELECT * FROM dbo.tblOrder WHERE ORDERID = @ORDERID AND 

...

  1. CSR LIKE '

...

  1. Rapidship%')

...

  1. 
    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
  2. 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.

  3. Click OK or Apply.

Tip

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.

  • When pasting the SQL code above into the Message Format for a customer in Cloud 2.0, extra white space might be added between words. That extra white space will need to be removed or else the SQL will not execute and the email will not be sent.

Apply the message format to the customer

  1. 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.

  2. Select the Contacts tab.

  3. Under Alerts select the Status Event “Order - Place“ and select the Message Format created above.

Note

You can only have 1 alert per status event.

...

Filter by label (Content by label)
kb-how-to-article
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@8e13fc70showSpacefalse
sortmodified
typeshowSpacepagefalse
reversetruelabels
typepage
cqllabel = "message-formats" and type = "page" and space = "CXTsupport"
labelskb-how-to-article