Announcing a New Product Release…

This is always a good sign for a software company, and here at Dovetail Software this has just become an easier task.

It is important for us to get the news about a new product release to our customers. By automating some of the steps in this task, we can get the information to the customer faster, and also add some business value to the process.

Now when a new release is ready, we can use the new Product Announcement tool to prepare the message for our customers.


Opening this application from within our in-house version of Dovetail Agent, we can see a list of all of our products that are currently under contract with any of our customers.

Clicking on one of the products will retrieve all of the customers under contract, and show a second grid filled with the contact information for those sites. Each contact that has an email address will be selected, and those without an email address are highlighted differently.

The contact information can be updated by double-clicking the contact’s row in the grid. Once the changes are saved for the contact, then the contact grid can be refreshed by clicking on the product again.

Each available email address is added to the BCC list, and the product details are filled into the subject and email body text. All of these text areas can be changed before the email is sent.

The body of the email is stored in the database, so the default template can be changed from within Dovetail Agent, instead of having to change to source code of the Product Announcement application.

When all of the changes are complete, the email can be sent. We send the message using Outlook, so clicking the Send Email button is the last step. It really makes it easy for us to get the word out to our customers.


Inside the Code

Inside the source code there a few interesting things that show how our applications are evolving as we develop new applications and features in our software.

The Product Announcement application has a built-in Help Page, accessible by clicking on the Help link at the top of the page. We use JavaScript to show the help contents directly in the page, so the focus of the user is not taken somewhere else.


Table Sorting

Both of the grids use the jQuery tableSorter plugin. This is a very simple way to add sorting for all of the columns in the grid. Here is the code that adds sorting for the customer grid, which adds the option of making the first column non-sortable.

   headers: {
      0: {
         sorter: false
   sortList: [[1,0]]


Tracking Announcement Activity

When the emails are sent, we also add an activity log for each contact, and one for the product itself. This allows us to track when the announcements were sent to the customers. To do this we are using AJAX through jQuery to add these activity entries for each customer and part.

   url: "addActivityLogs.asp",
   type: "POST",
   data: "site_part_list=" + site_part_list + "&product=" + escape(product) + "&contact_list=" + contact_list,
   error: function(xhr) {
      alert("Failed to add Activity Logs for " + product);

The addActivityLogs.asp code that gets executed by the AJAX call loops through the contacts and site parts, and uses the Dovetail Software SDK to create the new records for the database.


Better Layout and Style

All of the HTML layout and styling for the Product Announcement application is done using CSS. This is very different from the previous versions of Dovetail Agent. Dovetail Agent and Dovetail Admin will both be improving in this area as well in future releases.

This makes it easier to develop new applications, and much easier to change when necessary.


Using Outlook

Creating and sending emails through Outlook is very easy to do. First, when the the Product Announcement application is opened, we establish a connection to Outlook.

var objSession = new ActiveXObject("MAPI.Session");

To create and send the email, we create the new Message with the subject and text, add the recipients to the BCC list and send!

var objMessage = objSession.Outbox.Messages.Add;
var objRecipients = objMessage.Recipients;
objMessage.Subject = $("#txtSubject").val();
objMessage.Text    = $("#txtBody").val();

var bcc = new String($("#txtBCC").val()).split(";");
for(var i=0; i < bcc.length; i++) {
   email = bcc[i];
   if(email > "") {
      objRecip = objMessage.Recipients.Add();
      objRecip.Name = email;
      objRecip.Type = 3;

// Send the Message
} catch (e){
   objMessage = null;
   objRecipients = null;
   alert("Unexpected error:nn" + e.description + "nError Number: " + e.number);
   return false;

$("#sendButton").attr("disabled", true);

alert("Email successfully sent.");

You may notice that we use jQuery to interact with the page. This simplifies the JavaScript code required to get the subject, body, and recipients. We also disable the Send Email button after completion.



As we develop new applications, we also improve our techniques. Hopefully these examples will help you improve your techniques as well. Comments/Ideas/Suggestions are always welcome.