- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Sales Order Entry - Email Confirmati on
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-06-2011 04:52 AM - last edited on 12-06-2011 04:52 AM
Good morning!
I'm using MAS 90 4.3 - I was wondering if there's a way within paperless office or someplace that I can setup email confirmation to the customer when a sales order is created. Or is this yet another custom solution?
Thanks.
Re: Sales Order Entry - Email Confirmati on
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-06-2011 06:05 AM
We use two methods. For our service orders we use Knowledge Sync to send an email to our customers. We also have a script on a button that allows the order writer to send it out with the click of a button. Here is the code. It came from the Obe Wan of MAS, Slade.
' Slade Hornick ' Hornick Consulting www.hornickconsulting.com ' Original 01/29/2004 ' Example VBScript for emailing order information from S/O Entry Function FormatOrder(TheString) If Len(TheString) >= 7 Then FormatOrder = TheString Else FormatOrder = String(7-Len(TheString),"0")& TheString End If End Function ' Setup the connection to the ODBC Driver and login ' ******** ' Need to change the user to one on your system ' ******** If MAS_SCR_CMP = "SAF" then strConnectionString = "DSN=SOTAMAS90;UID=Louis|SAF;PWD=target" Else If MAS_SCR_CMP = "ICP" then strConnectionString = "DSN=SOTAMAS90;UID=Louis|ICP;PWD=target" End If End If Set Connection = CreateObject("ADODB.Connection") Connection.Open strConnectionString Set rsOrder = CreateObject("ADODB.Recordset") Set rsItems = CreateObject("ADODB.Recordset") SO_SalesOrder_bus_SalesOrderNo = FormatOrder(SO_SalesOrder_bus_SalesOrderNo) ' ' *********HEADER INFORMATION********* ' Select the header record and build part of the email body Sql_Order = "Select * from SO_SalesOrderHeader where SalesOrderNo ='" & SO_SalesOrder_bus_SalesOrderNo & "'" rsOrder.Open Sql_Order, Connection txtbody="Dear: " &SO_SalesOrder_bus_ConfirmTo &vbCRLF&vbCRLF&_ "we have received your order and it is currently being processed for shipping." &vbCRLF&vbCRLF&_ "Order No: "&SO_SalesOrder_bus_SalesOrderNo&vbCRLF&_ "PO Number: "&SO_SalesOrder_bus_CustomerPONo&vbCRLF&vbCRLF&_ "Qty"&Space(3)&"Item Number"&Space(18)&"Description"&Space(37)&"Price"&vbCRLF&_ "---- -------------------------------------------------- -------------------------------"&vbCRLF ' ' *********DETAIL INFORMATION********* ' Select the order line records and build part of the email body Sql_Items = "Select * from SO_SalesOrderDetail where SalesOrderNo='" & SO_SalesOrder_bus_SalesOrderNo & "' AND ItemType='1'" rsItems.Open Sql_Items, Connection Do While Not rsItems.EOF 'msg=rsItems("ItemCode") 'msgbox msg txtbody=txtbody&rsItems.Fields.Item("QuantityOrder ed").Value&String(5-Len(rsItems.Fields.Item("Quant ityOrdered").Value)," ")&" "&_ rsItems.Fields.Item("ItemCode").value&String(15-Le n(rsItems.Fields.Item("ItemCode").value)," ")&Space(23-Len(rsItems("ItemCode")))&_ rsItems.Fields.Item("ItemCodeDesc").value&String(3 0-Len(rsItems.Fields.Item("ItemCodeDesc").value)," ")&Space(36-Len(TRIM(rsItems("ItemCodeDesc"))))&" "&_ FormatNumber(rsItems.Fields.Item("ExtensionAmt").v alue)&vbCRLF rsItems.MoveNext Loop SubTotal=SO_SalesOrder_bus_TaxableAmt+SO_SalesOrde r_bus_NonTaxableAmt txtBody=txtBody&_ "================================================= ========================="&vbCRLF&_ Space(50)&"Sub-Total"&Space(7)&FormatNumber(SubTot al,2)&vbCRLF&_ Space(50)&"Shipping"&Space(8)&FormatNumber(SO_Sale sOrder_bus_FreightAmt)&vbCRLF&_ Space(50)&"Sales Tax"&Space(7)&FormatNumber(SO_SalesOrder_bus_Sales TaxAmt)&vbCRLF&_ Space(50)&"Grand Total"&Space(5)&FormatCurrency(SO_SalesOrder_bus_S alesTaxAmt+SO_SalesOrder_bus_FreightAmt+SO_SalesOr der_bus_NonTaxableAmt+SO_SalesOrder_bus_TaxableAmt )&vbCRLF&vbCRLF&_ "Thanks for your business."&vbCRLF&_ "If you have any questions about your order, you can contact your sales rep at 800-880-8855"&vbCRLF&_ "Safety Vision" Set rsItems = Nothing Set rsOrder = Nothing Set Connection = Nothing ' Create Email On Error Resume Next Dim objOutlook Dim objNameSpace Dim mItem Dim strReceipient Dim strSubject Dim strBodyText Dim strMsg Const olMailItem = 0 strMsg = "Enter Receipient Mail Address." & vbCrLf & "(Format: email@safetyvision.com)" strReceipent = InputBox(strMsg, "Send To:", "") strSubject = "Order Number: "&SO_SalesOrder_bus_SalesOrderNo strBodyText = txtBody Set objOutlook = CreateObject("Outlook.application") Set objNameSpace = objOutlook.GetNamespace("MAPI") Set mItem = objOutlook.CreateItem(olMailItem) mItem.To = strReceipent mItem.Subject = strSubject mItem.Body = strBodyText mItem.Save mItem.Send ' **** Clean up ' Set mItem = Nothing Set objNameSpace = Nothing set objOutlook = Nothing
--------------------------------------------------------------------------
You have enemies? Good. That means you've stood up for something in your life.
Re: Sales Order Entry - Email Confirmati on
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-06-2011 09:03 AM
bridgette wrote:Good morning!
I'm using MAS 90 4.3 - I was wondering if there's a way within paperless office or someplace that I can setup email confirmation to the customer when a sales order is created. Or is this yet another custom solution?
Thanks.
You can set up paperless office to send e-mails when you print the sales order.
Re: Sales Order Entry - Email Confirmati on
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-06-2011 09:41 AM
Heather wrote:You can set up paperless office to send e-mails when you print the sales order.
Just remembered I left out that option.
--------------------------------------------------------------------------
You have enemies? Good. That means you've stood up for something in your life.


