How to use Email Notification
The plain text Email Notification system built into Channergy is used to notify your customers about orders, back orders, purchase orders and more. The email notification system uses the same SQL language that the Report Writer uses, so almost any data can be extracted and emailed to your clients.
Note: Looking for the optional HTML Email Tool instructions? Go to: http://www.channergy.com/features/tools/channergy-email-notification-system/
- To access the Email Notification feature click on the Settings tab and Click on Email Notification button on the Channergy Explorer.
- Channergy comes with a set of pre-built email notifications that you can customize to meet your needs.
- Notice that there is a Contact Log check box for each email notification type. If this is checked the record of the sent message will be recorded in the customers log. See Customer Contacts for more information.
- To set up your email notification using one of the pre-built templates, double-click on the row that most closely matches what notification you want to send.
- To set up your email notification you will need to find the following information.
- Mail Host: This is the internet address of your email service.
- Account Name: This is also called your email login name.
- Server requires authentication: This checkbox is almost always required for email authentication.
- Password: This is the password that you use to log in to your email client.
- From Email Address: This is the email address that your customers will see.
- From Name: This will be your company name.
- Reply To Email Address: This is only required if you want your customers to reply to a different address than the From Email Address.
- Subject: In most cases you will probably want to keep this the same.
- Blind Carbon Copy: You can use this if you want the email notification to be sent to another recipient without the receiving party from knowing.
- Carbon Copy: This is for sending out email notifications to another email address.
- Click on the Message tab to customize the message that you send to your customers. This screen is divided up into three regions, the Header,Detail Records, and the Footer. This is the text of your email message. On pre-built email notifications you can use the existing text and change it to meet your needs. You can also insert fields from the query that is defined in the Data tab. To add additional data fields to the message you can type them in square brackets  or select them from the button.
- For example to insert an field into the Header, position the cursor where you want the field to be inserted and click on the to open the field menu.
- Select the field that you want added from the list by clicking on it.
- Once you have the layout that you want you can select the button to view all of the emails that match the criteria that you selected.
- You can double click on any of the memo fields to see a preview of the actual email text. Click the to close the preview and click the again to close the email preview list.
- You can send all of the emails in a group by pressing the button from the Emails screen this may prompt you for a date range, an order or a PO number. At this point you will see a list of the emails that are ready to be sent out.
- If you want to send the all the emails on the list, simply click on the button. If there are items in the list that you do not want to send emails out on, simply double-click on the check-box in the Send field to un-check the box.
- Once the emails have been send you will see a status message, a sent date and any error messages that may have prevented the email notification from sending out the message.
- To create a new email notification click on the button and key in the email settings under the Settings tab.
- Click on the Data tab and the following screen will appear:
- This screen contains 2 main parts. The top half shows the SQL code that is used to select which customers receive an email and what information is available to be displayed in the email. You can edit it manually or use the report writer interface to create or edit a campaign.The lower half contains pulldown lists of fields available from the query. These are used to specify which fields are used by the email.
- If you are creating a brand new campaign the SQL section will be blank. If you are editing a campaign text will appear in this section. If you know SQL you can edit it manually by clicking the checkbox next to “Manually enter SQL”. You may prefer to use the report writer interface to create or edit your query. To use it click the button. A dialog similar to the following will appear.
- You can create a query just as you would a report. For help creating reports see the help topic Modifying Reports. You can also load an existing report and edit it for your query. To do so click File -> Open Report from the text menu and browse to the Channergy Reports directory (located under your data directory). Select a report and click Open.Note: Some report functions are not available for email queries. This includes prompts for dates and fields, @functions (Sum, Count etc.), layout page features and field formatting. Also, when adding fields do not include spaces in headers.
- When you are finished making changes to your query click File -> Save from the text menu (Note: If you load an existing report and make no changes to it you must use File -> Save to save the query).
- Click File -> Close Report to exit the report writer dialog. If you made changes to the query you will be asked to save the query. Note: changes will NO T be made to any report you used to create the query. Changes are only made to the email query, and are stored in the Email table in the SQL field.
- You will be returned to the Data tab of the email campaign you are editing. You can now select fields in the pulldowns in the lower half of the screen. Fields are as follows:
- Group By – Use this to select a field by which results for the query will be grouped together. For example, if creating an invoice query group by OrderNo. This will list all items from an order within that order number.
- Email Address Field – Select the field the campaign will use for a mailing address. This is typically the email field from the Customer table. This field is required before you can Preview any results.
- Customer # Field – Select the field that contains the Customer #. This is used to associate the email with a specific customer account. The typical field for this is CustNo from the Customer table. This field is optional, but recommended.
- Order # Field – Select the field that contains the Order #. This is used to associate the email with a specific order. The typical field for this is OrderNo from the Orders table. This field is optional, but recommended.
- You can at this point click on the button to see the records that will be selected by the query. This preview does not show the actual email, that is available from the Message tab.
- Click on the Message tab to create or edit your email text. Use the instructions above to create your email message. You can type any text you wish into the Header and Footer sections. The Detail section is used for repeating data (e.g., products from an order). Use the Insert Field button to add variables (customer name and information, items orders, prices paid, amounts due etc.). When you are done editing the email click the button to save your changes. Use the instructions above for Sending Emails.
To setup to send PO as email attachment:1. Create the Email notification as usual. Can use any name. Use this as the query:SELECTSupplier.*, PO.*FROMSupplier, POWHERE
(SupplierNo = PO.SupplierNo)
AND (PONo = :CURRENTPONO)Group By: SupplierNoEmail Address Field: Email“Customer # Field” & “Order # Field” should be blankSet up the Message section as usual with the text they want.2. Go to Tools, Preferences, Products tab. At the bottom, select the Email notification that was just created from the drop down box.3. Open the PO screen. Make sure the Vendor for the PO has an email address set up. (However, there will be an opportunity to change or key it in later if desired)4. Choose the first option in the Reports menu on the PO screen (“Email as .pdf attachment…”)5. The PO report will show in preview mode. Click Cancel to close without emailing, or click Continue to go on.6. The Send Emails screen will pop up with the email to be sent. The email address can be changed or entered at this point before sending.7. Click the Send Now button to send the email.You can also change the PO .pdf that is created. To do so:
- Click the Purchase Order button on the Channergy main menu.
- In the PO screen that opens click the Setup text menu item at the top of the screen.
- Select Receiving Address. In the dialog that opens enter your address information. This can be selected under the Ship To address on the PO when you create or edit a PO.
- Click Setup again then select PDF Email Report. This opens a layout view of the pdf file that is created. You can change fields, enter text fields, add elements from the left column etc.
ADVANCED TIP: You can edit the SQL for the email directly (it is located under the Data tab). Additionally you can add prompts (e.g., Order #, Date Ranges etc.) for any field using the following syntax:
Channergy can include prompts in the scripts by using parameters with a certain structure. For instance, this statement would prompt for a date to be entered:
OrderDt = :DATE_Please_enter_the_order_date
This will prompt for a date with the text “Please enter the order date:” and would include in the result table (TEMP_MyTable) the orders that matched the
Parameters always start with a colon. Parameters with the following
prefixes will generate a prompt:
:TODAY_ (just like DATE, but defaults to today’s date)
You will get a prompt each time the parameter shows up in the SQL. If you use the same parameter twice, it will still prompt the second time, and a different value may be entered.
UNDER THE HOOD: The email notification system uses three tables Email, EmailBatch and EmailArchive. The Email table contains the Email name, host information, Subject, the SQL code for running the queries and the text for the header, detail in addition to the footer information. This is the table that is directly linked to the main email screen. The EmailBatch file contains a copy of the Email table when the email notification was sent out in addition to an incremental batch number. The EmailArchive table contains a record of each email that was sent out from the software including the date it was sent, the email address it was sent to , and the text of the email that was sent. This data is used for reports R8000 Email Notification Status and R8005 Email Notification Status with Text.