This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

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

OperationDescription
Working with EmailsCreates and sends an email using Salesforce.
Working with EmailsSends 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

  • No labels