This documentation applies to older versions of WSO2 ESB connectors. To find the documentation relevant to the version you are using, select the connector from the WSO2 Connector Store and click Documentation.

All docs This doc
Skip to end of metadata
Go to start of metadata


Overview

The following operations allow you to work with sObjects. Click an operation name to see details on how to use it.

OperationDescription
sendEmailCreates and sends an email using Salesforce.
sendEmailMessageSends emails that have already been drafted in Salesforce.

Operation Details

This section provides further details on the operations related to Emails.

Creating and sending an email

To create and send an email, use salesforce.sendEmail and specify the following properties. 

sendEmail
<salesforce.sendEmail>
    <sendEmail xmlns:sfdc="sfdc">{//sfdc:emailWrapper}</sendEmail>
</salesforce.sendEmail>
Properties
  • sendEmail: XML representation of the email.
Sample
<payloadFactory>
   <format>
     <sfdc:emailWrapper xmlns:sfdc="sfdc">
     <sfdc:messages type="urn:SingleEmailMessage">
        <sfdc:bccSender>true</sfdc:bccSender>
        <sfdc:emailPriority>High</sfdc:emailPriority>
        <sfdc:replyTo>[email protected]</sfdc:replyTo>
        <sfdc:saveAsActivity>false</sfdc:saveAsActivity>
        <sfdc:senderDisplayName>wso2</sfdc:senderDisplayName>
        <sfdc:subject>test</sfdc:subject>
        <sfdc:useSignature>false</sfdc:useSignature>
       <sfdc:targetObjectId>00390000001PBFn</sfdc:targetObjectId>
       <sfdc:plainTextBody>Hello, this is a holiday greeting!</sfdc:plainTextBody>     
     </sfdc:messages> 
      </sfdc:emailWrapper>
    </format>
    <args/>
</payloadFactory>
         
<salesforce.sendEmail>
    <sendEmail xmlns:sfdc="sfdc">{//sfdc:emailWrapper}</sendEmail>
</salesforce.sendEmail>
Related Salesforce Documentation

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_sendemail.htm

Sending existing email drafts

To send emails that have already been drafted, use salesforce.sendEmailMessage and specify the IDs of the emails you want to send. 

sendEmailMessage
<salesforce.sendEmailMessage config-ref="connectorConfig">
    <sendEmailMessage xmlns:sfdc="sfdc">{//sfdc:emails}</sendEmailMessage>
</salesforce.sendEmailMessage>
Properties
  • sendEmailMessage: XML representation of the email IDs to send.
Sample
<payloadFactory>
    <format>
        <sfdc:emails xmlns:sfdc="sfdc">
            <sfdc:Ids>0019000000aaMkK</sfdc:Ids>
            <sfdc:Ids>0019000000bbMkK</sfdc:Ids>
        </sfdc:emails>
    </format>
    <args/>
</payloadFactory>

<salesforce.sendEmailMessage config-ref="connectorConfig">
    <sendEmailMessage xmlns:sfdc="sfdc">{//sfdc:emails}</sendEmailMessage>
</salesforce.sendEmailMessage>
Related Salesforce Documentation

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_send_email_message.htm

  • No labels