Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:2000_concepts:0900_prod_feats:0500_email_handling [2022/08/25 00:00] – ↷ Page moved from 2000_concepts:0900_prod_feats:0500_email_handling to docs:2000_concepts:0900_prod_feats:0500_email_handling administrator | docs:2000_concepts:0900_prod_feats:0500_email_handling [2025/06/12 02:33] (current) – Rename to AwareIM aware_support3 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== E-mail Handling ====== | ====== E-mail Handling ====== | ||
| - | Many applications need to work with e-mails: e-mails often need to be automatically sent under the appropriate circumstances (for example, to remind customers that their insurance policy is about to expire) and certain actions need to be automatically performed upon receiving e-mails (for example, automatically register a support request from a customer). The following section describes how this can be done in //**Aware IM**//. | + | Many applications need to work with e-mails: e-mails often need to be automatically sent under the appropriate circumstances (for example, to remind customers that their insurance policy is about to expire) and certain actions need to be automatically performed upon receiving e-mails (for example, automatically register a support request from a customer). The following section describes how this can be done in //**AwareIM**//. |
| ===== Outgoing Email ===== | ===== Outgoing Email ===== | ||
| - | Sending outgoing e-mails is a part of a communication between //**Aware IM**// and an external party, such as an individual or an organization. Communication between //**Aware IM**// and external parties is described in the [[2000_concepts: | + | Sending outgoing e-mails is a part of a communication between //**AwareIM**// and an external party, such as an individual or an organization. Communication between //**AwareIM**// and external parties is described in the [[docs:2000_concepts: |
| There are, therefore, 3 steps involved in the configuration of an application that needs to send e-mails: | There are, therefore, 3 steps involved in the configuration of an application that needs to send e-mails: | ||
| Line 14: | Line 14: | ||
| - Define a notification representing a particular e-mail. | - Define a notification representing a particular e-mail. | ||
| - Define a business rule that will use the SEND action to send the e-mail under the appropriate circumstances. | - Define a business rule that will use the SEND action to send the e-mail under the appropriate circumstances. | ||
| - | Step 1 is described in the [[2500_config_apps: | + | Step 1 is described in the [[docs:2500_config_apps: |
| - | Step 2 is described in the [[2500_config_apps: | + | Step 2 is described in the [[docs:2500_config_apps: |
| - | Step 3 is described in the [[3100_actions:0130_send|SEND]] action section of the Rule Language Reference. One point to note here is that it is not necessary to create the notification representing the email explicitly using the [[3100_actions:0060_create|CREATE]] action – //**Aware IM**// will automatically create and initialize the notification before it is sent if it has not been created explicitly. Initialization expressions of the notification may use tag elements referring to the current Context (see [[2000_concepts: | + | Step 3 is described in the [[a_f:a:send|SEND]] action section of the Rule Language Reference. One point to note here is that it is not necessary to create the notification representing the email explicitly using the [[a_f:a:create|CREATE]] action – //**AwareIM**// will automatically create and initialize the notification before it is sent if it has not been created explicitly. Initialization expressions of the notification may use tag elements referring to the current Context (see [[docs:2000_concepts: |
| - | <code aim>" | + | <code aim>" |
| Then one could define the following rules: | Then one could define the following rules: | ||
| <code aim>FIND Customer WHERE Customer.Policy.ExpiryDate=CURRENT_DATE | <code aim>FIND Customer WHERE Customer.Policy.ExpiryDate=CURRENT_DATE | ||
| - | SEND ExpiryEmail TO Customer</ | + | SEND ExpiryEmail TO Customer </ |
| This is equivalent to the following: | This is equivalent to the following: | ||
| <code aim>FIND Customer WHERE Customer.Policy.ExpiryDate=CURRENT_DATE | <code aim>FIND Customer WHERE Customer.Policy.ExpiryDate=CURRENT_DATE | ||
| - | CREATE ExpiryEmail WITH | + | CREATE ExpiryEmail WITH |
| - | ExpiryEmail.Message=' | + | ExpiryEmail.Message=' |
| - | | + | SEND ExpiryEmail TO Customer </ |
| - | SEND ExpiryEmail TO Customer</ | + | |
| ===== Incoming Email ===== | ===== Incoming Email ===== | ||
| Line 39: | Line 38: | ||
| Just like outgoing e-mails incoming e-mails are represented by a notification. Unlike outgoing e-mails there is only one notification that represents an incoming e-mail. Its name is IncomingEmail. The name and attributes of this notification cannot be changed. | Just like outgoing e-mails incoming e-mails are represented by a notification. Unlike outgoing e-mails there is only one notification that represents an incoming e-mail. Its name is IncomingEmail. The name and attributes of this notification cannot be changed. | ||
| - | Conceptually this notification is received by a business space, so to define this notification the configurator must indicate that the business space will be receiving incoming e-mails. This process is described in detail in the [[2500_config_apps: | + | Conceptually this notification is received by a business space, so to define this notification the configurator must indicate that the business space will be receiving incoming e-mails. This process is described in detail in the [[docs:2500_config_apps: |
| - | Once the IncomingEmail notification has been added to the list of notifications it is up to the configurator to define business rules that will be triggered once the e-mail is received (see [[2000_concepts: | + | Once the IncomingEmail notification has been added to the list of notifications it is up to the configurator to define business rules that will be triggered once the e-mail is received (see [[docs:2000_concepts: |
| Example of a rule attached to the IncomingEmail notification: | Example of a rule attached to the IncomingEmail notification: | ||
| - | <code aim>If IncomingEmail.Subject = ' | + | <code aim>IF IncomingEmail.Subject = ' |
| - | CREATE SupportRequest WITH | + | |
| - | SupportRequest.Contents = IncomingEmail.Message</ | + | |
| This rule creates the business object '' | This rule creates the business object '' | ||
| - | The '' | + | The '' |