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 “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,
IF IncomingEmail.Subject = 'Registration' AND IncomingEmail.From = 'John Smith' THEN ...
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 SET
Action section of the Rule Language Reference. Your rules can then decode the information contained in the body of the e-mail using the SET
action. For example, if the body of the e-mail has the following string:
#Name#John Smith#State#NEW#Balance#100.0
Then the following rule:
SET Account FROM IncomingEmail.Message
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', 'NEW' and 100.0). You can define other rules that will check these values and perform the appropriate actions if required.