I just figured out this seems to be another feature/setting that isn't activated by default and has to be requested as a support case. So even if you see this feature in Email Studio when configuring triggered sends, you need separate activation for use within Journey Builder.
Error Threshold
A configurable limit that stops a send job when a designated number of errors occur.
This option helps prevent a single error from stopping the entire job. Contact your Salesforce Marketing Cloud relationship manager for more information.
(Source: Configure the Send Email Activity)
If the feature is activated there is a global threshold setting defined by support, that can be activated or deactivated in the send email activity via a checkbox. To be more flexible a user defined threshold on a per activity basis would make sense. Therefore I posted this on IdeaExchange. If you like the idea, please vote for it: User defineable Error Threshold in Journey Builder send email activity.
The same way you cause emails to be sent when you create a Case
through any other Apex, by setting DMLOptions
.
There is documentation on setting DMLOptions, but the highlights of that page are...
Database.DMLOptions dml = new Database.DMLOptions();
// For sending emails to the person designated as the Contact for the case
dml.EmailHeader.triggerAutoResponseEmail = true;
// For sending emails to salesforce users of your org
dml.EmailHeader.triggerUserEmail = true;
// For sending emails to addresses outside of your org
dml.EmailHeader.triggerOtherEmail = true;
If you also have auto-assignment rules for cases that are created, you may need to set another DML option AssignmentRuleHeader.useDefaultRule
.
If you're only working with a single case, you can use the setOptions()
method of the SObject class to actually set the dml options.
Case c = new Case();
Database.DMLOptions dml = new Database.DMLOptions();
c.setOptions(dml);
insert case;
For lists of SObjects, you'd need to use the database.<dml method>()
method instead of just [insert|update] <list of SObject>;
. That method only exists for insert and update (not delete, undelete, or upsert)
Database.DMLOptions dml = new Database.DMLOptions();
Database.insert(myCaseList, dml);
Best Answer
The simplest and fastest way to do this would be to combine a SQL query with your API call.
SELECT * FROM _Job
)(some samples of doing this from Docs)
You could also set this up as a CSV export or even use it in SSJS or AMPscript if you want.
The Job Dataview provides information on each of the email send jobs coming from SFMC.