Explore Courses Blog Tutorials Interview Questions
0 votes
in Salesforce by (11.9k points)

I'm using the Salesforce REST API to create a Case. I assign the SuppliedEmail field to the email of the user who's creating the case, as well as all other necessary fields. The case is correctly created in salesforce but the auto-response rule set up for it is not triggered. I have verified the rule is working and active, all conditions for the rule are met, so it's not a question of the rule not matching.

The problem is that salesforce is not evaluating/triggering auto-response rules after a Case is created through the API. Through the SOAP API, you can set this using the EmailHeader but I can't find a way to set this through the REST API.

To be clear I'm making a POST request to the URI /sobjects/Case with the JSON value of the case itself as the request body.

Is there a way to set the EmailHeader.triggerAutoResponseEmail field to true using the REST API, perhaps through some additional field in the request body?

1 Answer

0 votes
by (32.1k points)

So basically, lower complexity almost always comes at the cost of fewer features. Loss of API headers is one of them. At least in Java, you can consume WSDL properly using many available toolkits, in .NET the WCF is almost borderline useless because MS thinks SOAP headers are not cool (standards be damned).

So, either use WSDL/SOAP or create a workflow rule that will fire on Case creation and send an email to the desired address.

Related questions

Browse Categories