Tuesday, August 16, 2011

Salesforce Outbound messages not being sent

I ran into an issue with Salesforce whereby Outbound Messages weren't being sent as the result of a Workflow rule.

I confirmed that the Workflow rule was being triggered correctly by adding an Email Alert to the workflow actions. (Thanks Manu)

The debug logs indicated the outbound rule was being triggered.

03:03:34.066 (66407000)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:01I50000000HxXS
03:03:34.088 (88062000)|WF_RULE_EVAL_BEGIN|Assignment
03:03:34.088 (88127000)|WF_RULE_EVAL_BEGIN|Response
03:03:34.088 (88153000)|WF_RULE_EVAL_BEGIN|Workflow
03:03:34.088 (88207000)|WF_CRITERIA_BEGIN|[XJob: a0gQ0000001UvXy a09P0000000yVcR]|X Job Configure on Insert|01Q50000000Mcd3|ON_CREATE_OR_TRIGGERING_UPDATE
03:03:34.092 (92958000)|WF_RULE_FILTER|[XJob : Notes contains run]
03:03:34.093 (93021000)|WF_RULE_EVAL_VALUE|null
03:03:34.093 (93062000)|WF_CRITERIA_END|false
03:03:34.093 (93117000)|WF_CRITERIA_BEGIN|[XJob: a0gQ0000001UvXy a09P0000000yVcR]|XJob Triggers by Page Count >0|01Q50000000Mcd8|ON_CREATE_OR_TRIGGERING_UPDATE
03:03:34.093 (93325000)|WF_RULE_FILTER|[XJob : Page Count greater than 0.0]
03:03:34.093 (93375000)|WF_RULE_EVAL_VALUE|0
03:03:34.093 (93406000)|WF_CRITERIA_END|false
03:03:34.093 (93455000)|WF_CRITERIA_BEGIN|[XJob: a0gQ0000001UvXy a09P0000000yVcR]|XJob Process XYZ|01Q50000000Mcks|ON_CREATE_OR_TRIGGERING_UPDATE
03:03:34.093 (93576000)|WF_RULE_FILTER|[XJob : Status equals Ready]
03:03:34.093 (93618000)|WF_RULE_EVAL_VALUE|2
03:03:34.093 (93640000)|WF_CRITERIA_END|true
03:03:34.095 (95547000)|WF_SPOOL_ACTION_BEGIN|Workflow
03:03:34.095 (95614000)|WF_RULE_INVOCATION|[XJob: a0gQ0000001UvXy a09P0000000yVcR]
03:03:34.095 (95641000)|WF_EMAIL_ALERT|Id=01WP0000000Cfow|CurrentRule:XJob Process XYZ (Id=01Q50000000Mcks)
03:03:34.204 (204879000)|WF_EMAIL_SENT|Template:00X30000000ltQt| |CcEmails:
03:03:34.204 (204966000)|WF_ACTION| Email Alert: 1; Outbound Message: 1;
03:03:34.204 (204997000)|WF_RULE_EVAL_BEGIN|Escalation
03:03:34.205 (205019000)|WF_RULE_EVAL_END
03:03:34.209 (209428000)|WF_ACTIONS_END| Email Alert: 1; Outbound Message: 1;
03:03:34.209 (209468000)|CODE_UNIT_FINISHED|Workflow:01I50000000HxXS

It turns out that the user who was triggering the Outbound Rule had a Profile where Administrative Permissions: Send Outbound Messages was unchecked. As a result the outbound message disappears without a trace (which would have been useful to see in the debug logs).

I've created an idea to see if a message can be logged when the outbound message is suppressed due to the users profile.


  1. Hey, thanks - this helped us resolve a similar issue! I've voted up the idea as well.

  2. i am getting error while invoking webservice apex class from outbound message
    Error is: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
    apex class
    global with sharing class AutomatedApprovalRequest{

    Webservice static void SubmitApproval(ID id){
    system.debug('((((((((((((((((Leave object id((((((((((('+id);
    Approval.ProcessSubmitrequest Proqre;
    Proqre = new Approval.ProcessSubmitrequest();
    Proqre.SetComments('Sumitting for Leave approval');
    Approval.ProcessResult result = Approval.Process(Proqre);
    system.debug('((((((((((((((((Approval Process ((((((((((('+result );



    1. It looks like you are trying to send an outbound message from one Salesforce Org to a webservice defined in another Salesforce Org. If this is the case, the outbound message would not have the correct SessionId for the Org that hosts the web service.

      Maybe try asking a question on with as many details as you can include about your setup.