bw:email_tool

This is an old revision of the document!


Introduction (Email)

This document describes the use of the Bizweaver Email tool.

Audience

This document is intended for developers of Bizweaver workflows.

Related Documents

The following documents contain additional information that may be helpful with the development of Bizweaver workflows.

Before You Begin

At least one SMTP Global configuration must be defined to use the email function. See the Global Connections Guide for information on configuring this type of connection.

Email Formats

There are two general formatting options for Bizweaver Emails: plain text and HTML. While plain text is easier to set up, HTML provides more formatting options, but is more complicated.

Data can be presented in several ways. Individual data elements can be inserted into the text of the Email. “Lists” of data can be presented in a table format. Or the data can be included in an attachment to the Email. The method you use depends on the data to be presented and how the recipient will use it.

Email & HTML Designer

The Bizweaver Email tool is used to define technical settings to allow Email messages to be sent from Bizweaver and to format the message content.

  1. An Email object may be associated (linked) to a SQL Command: Reader workflow step that will be the source of the message content. The appropriate step is selected from the Linked Object drop-down list.
    1. A Linked Object is only required if the content of the email will be a table based on the source data.
    2. A Linked Object may be used to pick fields from the linked object dataset to be used in the message body. However, using the F4 option as described below is preferable.
  2. Select the appropriate SMTP connection from the drop-down list.
    1. This connection must be defined before it can be used here.
  3. The Skip email … option is used in cases where there may not be any content to send. It acts as a built-in decision element.
  4. The From Email address is specific to your environment. This can be obtained from your system administrator.
    1. In Microsoft Exchange environments, this can typically be any user.
  5. Enter the address of any recipient to be shown in the “To” line of the email in the To field.
    1. Multiple recipients can be specified by separating each address with a semicolon (;). This applies to CC and BCC as well.
    2. Recipients can also be defined using workflow variables (static or step) from previous steps. This applies to CC and BCC as well. See the document “Bizweaver – Using Variables” for more information.
  6. Enter the address of any recipient to be shown in the “CC” line of the email in the CC field.
  7. Enter the address of any recipient to be shown in the “BCC” line of the email in the BCC field.
  8. Subject appears in the subject line of the Email.
    1. Subject information can include workflow variable(s) from previous steps.
  9. Message is the body of the message.
    1. See the “Email Elements” section below for more information

Email Elements

The Email message can be a simple text message, but in most cases the text will also include other data elements such as workflow variables or tables of data.

Insert

Basic data elements can be inserted into the message using [Date], [Time], and [Field Name] buttons in the Insert row as shown below

  1. To add the current date or time in the message.
    1. Position the cursor at the point in the message where the information is to be placed.
    2. Click [Date] or [Time] to insert the item.
  2. To add data elements from the Linked Object in message.
    1. Position the cursor at the point in the message where the information is to be placed.
    2. Click [Field Name] to insert the item.

Inserting data into the message body is more easily done using the <F4> selection method, rather than using a Linked Object.

Tables

Data can be presented in a table (row & column) structure within the body of a Bizweaver Email. This approach is helpful when there are multiple rows of data to present, but the amount of data does not necessarily warrant the use of an attachment.

The table must be defined before it can be used in the message. See Using Tables for information on creating a table.

To add a table into the message body.

  1. Select the table from the drop-down list
  2. Position the cursor at the point in the message where the table is to be placed.
    1. Click [Insert Table] to add the table to the message.

Your message must use HTML format to include tables. See the The HTML Editor section for more information. If you insert a table into a plain-text message the application will prompt you to change the format.

Attachments

Attachments can be included with an Email as needed. The attachment can be a static file such as a marketing document, or it can be generated as part of the workflow process. See Handling Attachments for more information.

HTML Editor

The HTML Editor tool can be used to format the Email using standard HTML tags. See The HTML Editor for more information.

Using Tables

  • A Linked Object must be associated with the email step to create a table.
  1. Tables are created and maintained using the [Open Table Definition] button.
    1. To create a new table, be sure the “Tables” drop-down field is empty, then click [Open Table Definition].
    2. To maintain an existing table, select the table from the “Tables” drop-down, then click [Open Table Definition].

Table Definition

The Table Definition function opens in the “Layout Designer” mode. This is the easiest way to create and maintain tables. However, the actual HTML code can be viewed and edited by clicking on the “Source” tab. Use of the “Source” option is not discussed in this document.

Click the [Refresh] button to see a representation of the table. Not all settings will be displayed but items like borders and colors can be checked.

To include column headings, select the “Header” checkbox in the “Column Layout” section.

Column headings of the column names coming from the source. You may need to modify the column headings in the source for them to be displayed properly.

Table Data - General

All columns in the data source associated with the Email are listed at the top of the layout designer. Width, color, and alignment settings in this section allow these values to be set for each column if needed. For most cases, the settings in the Column Layout section will provide more flexibility.

  1. Select the Include checkbox to include a column in the table.
    1. The column order cannot be changed using the layout tool. The columns will be presented in the order shown.
  2. Enter the desired Width for this column (in pixels).
    1. If no value is entered for column width, the width is determined based on standard HTML rules; generally, evenly divided among undefined columns.
  3. Click on the Color field to display a Color Picker tool.
    1. This color is the background of the cell.
    2. Select the desired color from the picker.
    3. If a color is set here, it will override a color set in the Column Layout section.
  4. Select the desired horizontal alignment from the Align drop-down list.
    1. If an alignment is set here, it will override an alignment set in the Column Layout section.
  5. Select the Subtotal checkbox to get a subtotal for numeric values based on the Group option.
  6. Select the Group checkbox to have the rows grouped by this value
  7. Select the Grand Total checkbox to present a grand total for numeric values.

Table Layout Section

This section provides settings for the overall layout of the table.

  1. Enter a Name for this table.
  2. Enter a Description for this table.
  3. Select the Alignment (left, center, right) of the table on the page.
    1. Only applies if the table Width is less than 100%.
  4. Set the background color of the table.
    1. All rows and columns are set to this color.
    2. Click on the (…) button to open a color-picker tool or enter the hex code of the desired color directly.
  5. Enter/select the width (in pixels) value of border lines of the table cells.
    1. The default value is 0 but a minimum of 1 should be used in most cases.
  6. Enter/select the cell padding (in pixels) value of the table cells.
    1. Cell padding is the space between the border and text of a cell.
  7. Enter the cell spacing value (in pixels) between the cells.
  8. Enter the Width of the table as a percentage of the page.
    1. 100% will span the entire page and columns are adjusted accordingly.

Row Layout Section

This section provides settings for rows of the table.

  1. Select the Alignment (left, center, right) of the text in the cells.
    1. This option is generally not used since row alignment controls the table layout.
  2. Select the Vertical Alignment (top, center, bottom) of the text in the cells.
    1. This option is generally not used since the Column layout controls the vertical position.
  3. Set the Background Color of the rows.
    1. Use of this option overrides the table layout setting.
    2. Click on the (…) button to open a color-picker tool or enter the hex code of the desired color directly.
  4. Set the Alternative Color of the rows.
    1. This color is used for alternating rows. Row 1 is the background color, row 2 is the alternative color, etc.
    2. Use of this option overrides the table layout setting.
    3. Click on the (…) button to open a color-picker tool or enter the hex code of the desired color directly.

Column Layout Section

This section provides settings for columns of the table.

  1. Select the Alignment (left, center, right) of the text in the cells.
  2. Select the Vertical Alignment (top, center, or bottom) of the text in the cells.
  3. Select the Height of the rows.
  4. Set the Background Color of the columns.
    1. Use of this option overrides the table layout and row settings.
    2. Click on the (…) button to open a color-picker tool or enter the hex code of the desired color directly.
  5. Set the Alternative Color of the rows.
    1. This color is used for alternating columns. Column 1 is the background color, column 2 is the alternative color, etc.
    2. Use of this option overrides the table layout and row settings.
    3. Click on the (…) button to open a color-picker tool or enter the hex code of the desired color directly.
  6. Enter the Width (in pixels) of the columns.
    1. This option is not typically used.
  7. Enter the Column Span value.
    1. Use the default value of 0.
  8. Enter the Row Span value.
    1. A value of 0 or 1 places one record per row. A value of 2 displays two records per row, etc.
  9. Select the Header checkbox to include column headers.
    1. The column header value is the value reported from the data source and cannot be changed. It may be necessary to change the column names in the source in order to have the column headings appear appropriately.

Group Layout Section

This section provides settings for any grouping rows of the table.

  1. Select the Alignment (left, center, right) of the text in the cells.
  2. Enter/select the Cell Padding (in pixels) value of the table cells.
    1. Cell padding is the space between the border and text of a cell.
  3. Set the Background Color of the columns.
    1. Use of this option overrides the table layout and row settings.
    2. Click on the (…) button to open a color-picker tool or enter the hex code of the desired color directly.
  4. Enter the Cell Spacing value (in pixels) between the cells.
  5. Enter/select the width (in pixels) value of border lines of the table cells.
    1. The default value is 0 but a minimum of 1 should be used in most cases.
  6. Enter the Width (in pixels) of the columns.

Handling Attachments

Email generated from Bizweaver can include attachments. These can be files created as part of the workflow (common) or static files (such as sales information) you might wish to include.

The following example illustrates the use of an attachment based on a workflow step.

In this example, we create a file based on a SQL Command step, and save it. We then reference the file via a variable name to use it as an attachment. Finally, we delete the file. The deletion step is optional.

To add attachments to an Email, click the [Attachments] button on the Email tool. The Attachments dialog window is displayed.

  1. The upper area of the window lists the attachments associated with this Email.
  2. Use the Add custom variable field to reference variables in this workflow.
    1. Position the cursor in the field and press F4 for available workflow steps and variables.
    2. Select the desired variable.
    3. Click [Add] to include this value as an attachment.
    4. In this example, we use the file created in the previous File Writer step.
  3. Click the [Add Files] button to display a standard Windows Explorer window.
    1. Select existing files to be included as attachments.
    2. Remember that the path to these files is fixed. If the files are moved to another folder, or removed, the attachment process will fail.

      An example of how this type of attachment could be used would be to include a “This month’s special deals” flyer whenever an AR Invoice is sent out via Email. The invoice document would typically be generated via Crystal Reports, so it would be unique each time and assigned using a step variable. The flyer would be a static document that is included using the process described here. So, the Email will use both Bizweaver attachment options.

  4. Ordered List ItemSelect (highlight) an entry in the listing section and click the [Remove] button to remove an attachment.

The HTML Editor

The HTML Editor is used to design Email text using standard HTML tags. By default, a Bizweaver Email uses plain text. When you open the HTML Editor, the text is converted to HTML. When you save the HTML, the HTML structure is displayed in the message body. Also, if you add a table to the Email body, the type is changed to HTML.

There are two modes for the editor. The most common is the “View Editor.” This mode displays how the Email will appear. The second mode is “View HTML Source.” This mode displays the HTML code, which can be edited as needed.

Standard Windows text editing functions are available in the icon bar at the top of the window. When these functions are used in the “View Editor” they are converted to the corresponding HTML tags.

Click the [Customize] button to display or hide a list of data tags that are available for use. These are equivalent to many of the workflow variables discussed elsewhere. To insert a tag into the text, position the cursor where the tag is to be placed. Double-click the tag in the “customize” list and it will be inserted.

Click the [Save and Close] icon to save the HTML in the Email. The standard [Save] icon will try to create a file on disk.

bw/email_tool.1608059581.txt.gz · Last modified: 2020/12/15 14:13 by akoehler