Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:3400_how_to:0700_emails:0970_process_emails [2022/08/25 07:46] – ↷ Links adapted because of a move operation administratordocs:3400_how_to:0700_emails:0970_process_emails [2025/06/11 08:34] (current) – ↷ Links adapted because of a move operation aware_support3
Line 3: Line 3:
 ====== How to process e-mail based on its contents ====== ====== How to process e-mail based on its contents ======
  
-In order to process the received e-mails you need to define business rules attached to the event of receiving an e-mail notification – see the “[[docs:2500_config_apps:2300_emails:0100_incoming_emails|Incoming E-mail]]” section. The rules may check the subject and/or body of the e-mail (or maybe who it is from and when it was sent) and perform the appropriate actions. For example,+In order to process the received e-mails you need to define business rules attached to the event of receiving an e-mail notification – see the “[[docs:2500_config_apps:2600_emails:0100_incoming_emails|Incoming E-mail]]” section. The rules may check the subject and/or body of the e-mail (or maybe who it is from and when it was sent) and perform the appropriate actions. For example,
  
-<code aim>IF IncomingEmail.Subject = 'Registration' AND IncomingEmail.From = 'John Smith' THEN ...</code>+<code aim>IF IncomingEmail.Subject = 'Registration' AND IncomingEmail.From = 'John Smith' THEN ... </code>
  
  
-If e-mails contain complex information that you want to analyse then this information may be encoded into the body of the message in a special format (you have to mandate that the senders of such e-mails encode the bodies of their e-mails in this format). The format is described in the ''[[docs:3100_actions:0300_set|SET]]'' Action section of the [[docs:3000_rule_language|Rule Language Reference]]. Your rules can then decode the information contained in the body of the e-mail using the ''[[docs:3100_actions:0300_set|SET]]'' action. For example, if the body of the e-mail has the following string:+If e-mails contain complex information that you want to analyse then this information may be encoded into the body of the message in a special format (you have to mandate that the senders of such e-mails encode the bodies of their e-mails in this format). The format is described in the ''[[a_f:a:set|SET]]'' Action section of the [[docs:3000_rule_language|Rule Language Reference]]. Your rules can then decode the information contained in the body of the e-mail using the ''[[a_f:a:set|SET]]'' action. For example, if the body of the e-mail has the following string:
  
-<code aim>#Name#John Smith#State#NEW#Balance#100.0</code>+<code aim>#Name#John Smith#State#NEW#Balance#100.0 </code>
  
 Then the following rule: Then the following rule:
  
-<code aim>SET Account FROM IncomingEmail.Message</code>+<code aim>SET Account FROM IncomingEmail.Message </code>
  
-will set the Name, State and Balance attributes of the Account objects to the values provided in the body of the e-mail (John SmithNEW’ and 100.0). You can define other rules that will check these values and perform the appropriate actions if required.+will set the Name, State and Balance attributes of the Account objects to the values provided in the body of the e-mail ('John Smith''NEWand 100.0). You can define other rules that will check these values and perform the appropriate actions if required.
  
  
  
  • Last modified: 2022/09/13 18:11