Email-to-Flow, let’s deal with some spam (Microsoft 365)

Email-to-Flow is available on the Salesforce Appexchange.

If you haven’t taken a peek at Introducing Email-To-Flow, a low-code Email Service – Sproket Logic, please do.

In this installment, let’s take a look at Microsoft 365 spam protections. And, more importantly, let’s see how Email-to-Flow can leverage this protection and give you more flexibility in your email service routing.

Before we get started, let’s review a couple of term briefly.

What is Junk email?

Junk email is spam. Yes, this is an extremely basic definition. But for our needs, spam/junk email is typically defined as unsolicited and universally unwanted messages.

What is Bulk email?

Bulk email (or gray mail) is email generated in bulk. In other words, a mailer generates the same or similar content to a large number of recipients. Unlike spam email, bulk email may be good or bad (and many shades in between). Bulk email might be “good”, such as a vendor sending coupon codes to individuals that have subscribed to a service. Bulk email might be “bad”, such as a vendor selling a high volume of unsolicited content.

What is Microsoft 365 Exchange Online Protection?

In Microsoft 365 organizations with mailboxes in Exchange Online or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, inbound messages go through spam filtering in EOP and are assigned a spam score(s).

The specific EOP scores we will be discussing today are Spam Confidence Level (SCL) and Bulk Complaint Level (BCL)

What is Spam Confidence Level (SCL)?

The EOP filtering process assigns emails a SCL score. The higher the score, the more likely an email is spam. The scores break down as follows:

-1The message skipped spam filtering (most likely pre-flagged as safe)
0, 1Spam filtering determined the message was not spam.
5, 6Spam filtering marked the message as Spam
9Spam filtering marked the message as High confidence spam
SCL will not produce a score of 2, 3, 4, or 8

What is Bulk Complaint Level (BCL)?

The EOP filtering process assigns email a BCL score. The higher the score, the more likely the email has or will generated complaints. The higher the likelihood of complaints, the more likely the email is spam.

0The message isn’t from a bulk sender.
1, 2, 3The message is from a bulk sender that generates few
4, 5, 6, 7The message is from a bulk sender that generates a mixed
number of complaints. Most anti-spam filter set their policy at
7 by default.
8, 9The message is from a bulk sender that generates a high number of complaints.

Now that we have a working set of definitions, what does this all mean for Email-to-Flow?

Good question. Email-to-Flow has a special apex action, Get Outlook Spam Confidence, to retrieve an email’s SCL and BCL scores (assuming it was processed by EOP). These scores can be leveraged to implement your own spam processing logic.

Get Outlook Spam Confidence Details


HeaderThe header string from the email service


bulkComplaintLevelThe BCL score returned by the email.
The value is null if not found.
bulkComplaintLevelDefinitionA description of the BCL score, if the BCL score is
spamConfidenceLevelThe SCL score returned by the email.
The value is null of not found.
spamConfidenceLevelDefinitionA description of the SCL score, if the SCL is
spamConfidenceLevelCategoryThe category of spam detected, if SCL is
isSuccessTrue is the apex action was successful.
False if an error was encountered
errorMessageIf isSuccess equals false, the error message