User Tools

Site Tools


advanced:auto-attaching_documents

Auto-Attaching Documents and E-Mails

There are several tools and methods in Digital-Clay to auto-attach documents and e-mails to items. First, some concepts:

  • A document can be attached to an item/record. This means it is attached to the specific item only and is related to the item.
  • A general document can also be stored in a public Digital-Clay folder using the Document Repository.
  • An Attachment Field (as opposed to an attachment file) can store a link to any document/attachment whether it is attached to an item, or stored in a public Digital-Clay folder. In other words, the field is a link to a file which is attached/stored somewhere else.

Auto-Attach Advanced Options

There are several advanced attachment options that can be used when generating documents from templates, or when sending mail from item lists using the Send Mail tool. In all of these cases, the dialogs include a checkbox and a button for setting Automation options. If the checkbox is checked but no advanced options are changed, the default action is to attach each document to its item only.


autoattach3.jpg



The Automation button opens the following dialog:




If the OK button is pressed, all of the selected auto-attach options are saved in the local Registry per table. In other words, the settings will be restored next time documents are being generated for the same table.


Creating Documents From Templates

All of the auto-attach options are available in any of the following scenarios:

  • The document is being generated in the Documents tool, or using the Print/Save Document tool in item lists.
  • The document is generated by ClayCentral Automation either during an item event, or a scheduled timer event.
  • Multiple documents are being generated for multiple items and either saved or sent via e-mail.
  • A single document is being generated for a single item, or the documents are being combined into one document for multiple items. Multiple documents generated in one document (page break, continuous, labels) cannot be auto-attached.
  • A document is generated via the 'Menus for Template Actions' feature which has default auto-attach options set.

The only exception is when generating a 'General' (non-item-specific) document, in which case the document cannot be attached to an item, but it can be attached to a new item or to a folder.

Example 1: One document per item

A common scenario is when you want to create one document per Contact for 100 Contacts, e-mail each document to the relevant Contact, and attach it to that Contact.

Action: Check 'Attach To Item', select 'Current Item', and uncheck 'Attach to Folder'.

Advantages: Each Contact has its own e-mail history in its Attachment tab, with the exact e-mail that was sent.

Disadvantages: When sending mass e-mails, this can accumulate to many thousands of files. It also means the same generated template is being stored several times.

Example 2: One new item per document

This scenario causes a new item to be created for each generated document, and this item can optionally be linked to the item for which the document is being generated. The document is then attached to the new item. For example, for each Contact being e-mailed, a Task can be created with an attached e-mail, and this Task is linked to the Contact.

Action: Check 'Attach To Item', select 'New Item' and set the table and linked fields, and uncheck 'Attach to Folder'.

Advantages: This is similar to the previous example except with the added advantage of being able to see Attachments as records in the Related Items tab, or using advanced item filtering in item lists, etc. In addition, non e-mail Tasks that were completed for this Contact can be listed together with the e-mail Tasks.

Disadvantages: See Example 1.

Example 3: One document for all e-mails

In this scenario, the template used to generate a mass e-mail is stored in a public folder and all the Contacts that were e-mailed merely contain a link to this single template document.

Action: Uncheck 'Attach To Item', check 'Attach to Folder' and select a folder, and check 'Set attachment field' and select the field. Note that a many-to-many Attachment Field can be selected in which case the current document will be appended to the existing list of Attachment links.

Alternative: Use 'Add attachment link' instead of 'Set attachment field'. A link to the single document will be added to the item attachments. This link is a dynamic link to the document in the public folder.

Note that in the case of Automation, the only case a single document is attached to multiple items is during the 'Item Timer' event (which runs the same actions on multiple items).

Advantages: Only one document is stored even for thousands of e-mails and all the Contacts still keep a record of what was sent.

Disadvantages: The template is stored, not the actual e-mail. This may not be useful if the generated document contains dynamic analysis or report data that needs to be stored as a snapshot. With typical mail-merge letters however, only the template and the static content of the letter is important.

Example 4: One document and one record per item

This scenario combines examples #2 and #3 above. E.g. a new Task is created per e-mail, but this Task only contains a link to the Template that was sent.

Action: Check both 'Attach To Item' and 'Attach to Folder', select 'New Item', set all the relevant settings and check 'Attach to new item field only'.

Other Variations

  • The document can be stored in a public folder without attaching it to any item. E.g. a folder can be created which merely stores all the spam e-mails that were sent to all Contacts.
  • Tasks can be generated per e-mail without linking them to any records.

Send-Mail Tool

The Send-Mail tool in item lists can be used for all of the above scenarios in the same way with the following differences:

  • When the mail is stored in a Folder, the actual e-mail is stored, not a template. This is obviously because there is no template in this case and all Contacts are receiving the exact same e-mail. This means that storing the e-mail in a Folder no longer has the disadvantages of Examples #3 and #4.
  • The extra attachment that is sent along with the e-mail can also be attached to items or a public folder using a separate checkbox.



Outlook E-Mail Integration

The ClayStation plug-in for Outlook displays a button above every Outlook e-mail for attaching the e-mail to Digital-Clay:

Many default values for this dialog can be set using the ClayOutlook Tools/Options in the Mail tab.

This dialog has several advanced capabilities and functions:


Attach to item

This tab is for attaching the e-mail to an existing or new item (which you must create manually). This is similar to Example #1 above.

The type of item to attach to is selected using the table drop-down.

Create item from mail

This tab is for creating a new record automatically from the e-mail data and optionally attaching the e-mail to it. This is similar to Example #2 above.

The e-mail subject is copied into the Name field and the Body is optionally copied into a Notes field. Other field values may be set using the Edit Item button.

In addition, the new record is automatically linked to the selected item in the second drop-down which is relevant for the sender/e-mail address. For example, a new Task can be created which has the e-mail subject as its name, and which is linked to the Contact who is the sender of the e-mail.

Note that the list of tables is limited since this tab actually copies e-mail data into the record and therefore it needs to know which fields to set. These fields may be set in Tools/Options. If all you want to do is create a new empty record and attach the e-mail to it, use the New button in the 'Attach to item' tab.

This section helps the user find the correct item for attachment. It does this by querying for items containing the e-mail addresses in the Outlook e-mail. For example, it can search for all Contacts with the same e-mail address as the sender, and select the first one it finds in the drop-downs above. Note the following:

  • It can also search in a linked table using the link that you select. E.g. it can search for all Customers that are linked to a Contact which has the relevant e-mail. I.e. If the Contact 'Bill Gates' (Customer:Microsoft) has the e-mail 'gates@microsoft.com' which is the sender of the Outlook e-mail, it will show Microsoft in the item drop-downs in both tabs. For this to work, the table must be Customer and the Linked Table must be Contact.
  • It searches in ALL e-mail fields that exist in the selected table. Custom function fields are also used if they are of display type 'E-Mail'.
  • By default the 'Show only items related to senders/recipients' is checked unless no e-mail addresses were found in the Outlook e-mail.

Other Settings

  • The date of the e-mail can be used as the Created date of the Attachment. This is useful in case the e-mail is old and the received date is important.
  • All attachments inside the Outlook e-mail can optionally be attached as well.
  • Digital-Clay saves the Outlook e-mail in the format that it was sent. E.g. Word, RTF, HTML.
advanced/auto-attaching_documents.txt ยท Last modified: 2014/05/22 14:59 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki