Overview
The following operations allow you to work with sObjects. Click an operation name to see details on how to use it.
Operation | Description |
---|---|
Working with Emails | Creates and sends an email using Salesforce. |
Working with Emails | Sends emails that have already been drafted in Salesforce. |
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>123@gmail.com</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