Attach to Record for Query based on Field Parser Fields

In this user wants to attach incoming email on a provided record of an object. From an incoming email user gets the parser field value, user is checking whether the parser field value exists on a provided record of an object or not. If record exists, then email will attach with that record.

Email Parser Actions section.

  • Click on New button to create a new Email Parser Action.
  • Enter the name as Query based on field parser fields and select Attach To Record in the Type section.
  • Afterwards, select Account in the Object Type field and set Filter Criteria value. Filter criteria value can be static or dynamic
    • Example (Dynamic Value) AccountNumber = [AccountNumber]
      • In the above context of [AccountNumber] represents a dynamic filter criteria. CTK Email parser automatically replaces it by value extracted from field parser named AccountNumber (You can use name of any field parser you have created)
    • Example (Static value) AccountNumber='CC634267' 
      • Note: The usage of square brackets shows that the filter criteria are Dynamic in nature. Whereas in the case of static, only single quotes are used.
  • Then finally click on Save button.

Attach Configurations

By default, Email is attached as Email Message to selected record (appears in activity timeline as emails sent from salesforce). However, admin can configure email to be attached as an Attachment or File to the selected record.

Note: Email attached as Attachment or File, is converted to EML format

Attach as

  • Email (default) – attaches email as Email Message (Salesforce native capability)
  • File (ContentDocument) – attaches email as a Salesforce File (API Name: ContentDocument)
  • Attachment – attaches email as a Salesforce Attachment (API Name: Attachment)

Save Email Attachments

Set checkbox to selected (checked) to save email attachments along with saved email. If this is unchecked, any email attachments are ignored.

Object Configuration

Object Type

Provide API name of the Salesforce object with which you want to attach email.

Filter Criteria

Provide criteria to be used to find record to be used to attach email. You can use static filter criteria or any data point retrieved via field parser (configured within same email parser).

Advanced Filter Criteria Options

Combining Filter Criteria:  

Filter criteria can be combined in different ways to suit your specific requirements. These combinations may include Dynamic and Static (Vice-Versa), Static and Static, Dynamic and Dynamic, Dynamic and Dynamic or Static, Static and Dynamic or Static, etc. offering versatile options for data management.  

Example 1 – Dynamic and Static

In the following example:

Name= [getName] AND Type = Prospect 

The first filter criterion (Name) is Dynamic, denoted by square brackets, while the second criterion (Type) is Static. This combination allows for precise data filtering.   

For a record to be successfully retrieved and attached to an email, both specified criteria must be met. In other words, the conditions set by both the dynamic and static filter criteria must be satisfied to ensure accurate data retrieval and seamless email integration.   

Example 2 – Dynamic, Static, and Dynamic

In the second example, we can use multiple combinations of dynamic and static filter criteria.

Name = [getName] AND Type = 'Prospect' OR AccountNumber = [AccountNumber] 

The first filter criterion (Name) is Dynamic, the second (Type) is Static, and the third (AccountNumber) is Dynamic. This versatile combination ensures a comprehensive approach to data filtering.

In this scenario, a record is retrieved and subsequently attached to an email when the following criteria are met:  

  • The Name field must be fulfilled.  
  • In addition to Name, fulfillment of either the Type or AccountNumber is also required.  

This dual requirement ensures that the record is accurately fetched and linked to the appropriate email.  

These combinations empower you to refine your data selection with a mix of static and dynamic criteria, tailoring your approach to your unique requirements.