1

I recently came up with a business requirement that I'm not sure how to implement. Our product owner basically wants to:

Send a set of email reminders to the main contact role associated with an opportunity when the opportunity is becoming stale.

Furthermore, as an extra:

Give the user the opportunity to reset the reminders set count so once all the reminders have been sent, they can be resent again.

The current data volume is of around 1.000 daily opportunities, so it could be done internally in Sales Cloud with just a Process Builder, but I do not want to do it like that because the volume increases each month and there is a limit of 5.000 daily outbound emails in Sales Cloud.

Therefore, the solution that came to my mind is to use the Marketing Cloud subscription the company pays. It's much more scalable emails-wise... and it's already being paid for.

The problem is that when looking at the API, I only came up with two ways of doing this:

  1. Using triggered sends
  2. Using user-initiated sends
  3. Using a dumb journey with a Data Extension

The main cons of either were, in the case of the Triggered Send:

  • The email send is atomic. That is, I cannot send multiple emails with a single API call from Sales Cloud.

  • Binding template variables must be done via AMPScript, doing lookups to the Synced Data Extensions, which makes creating the templates much more complex and error-prone.

  • This isn't a functionality thought to schedule sends, it's more of a "trigger" as the name suggests, so it makes handling this complex too.

On the other hand, the cons of the User-initiated Send are:

  • Multiple API calls need to be done for just one send, since I would have to play around with the EmailSendDefinitions, the Data Extensions, etc.

  • The coding the integration is more complex due to having to use the SOAP API.

Lastly, I also leveraged the option of coding all the scheduling logic in Apex and simply uploading the contacts to a dumb data extension which would be the entry point of a dumb journey with simply an email send.

The problem with this last solution is sending the multiple reminders: I would have the option of data cleansing the DE every day, or creating one DE + journey for each reminder. This latter is not scalable at all, and the prior makes me uneasy since I would not have the option to track failures since the data would be deleted every day with the retention policy of the DE.

So, with all this, I do not know if there are other ways of achieving my end goal or, given these potential solutions, either of them is better than the other for other reasons I don't know of.

1 Answer 1

1
+50

Sending Emails to Multiple Subscribers

You made the following statement:

The email send is atomic. That is, I cannot send multiple emails with a single API call from Sales Cloud.

You can actually achieve this using the Marketing Cloud SOAP API. The following method will send a Triggered Send email (for a defined CustomerKey) to an array of Subscribers that you specify in your request envelope:

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <s:Header>
      <a:Action s:mustUnderstand="1">Create</a:Action>
      <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">{{soapEndPoint}}</a:To>
      <fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth>
   </s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <Options>
        <RequestType>Asynchronous</RequestType>
        <QueuePriority>Medium</QueuePriority>
      </Options>
       <Objects xsi:type="TriggeredSend">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <TriggeredSendDefinition>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>InsertCustomerKeyHere</CustomerKey>
               <SendWindowOpen>1600</SendWindowOpen>
               <SendWindowClose>1800</SendWindowClose>
               <SendLimit>500</SendLimit>
            </TriggeredSendDefinition>
         <Subscribers>
           <PartnerKey xsi:nil="true"/>
           <ObjectID xsi:nil="true"/>
           <SubscriberKey>999991</SubscriberKey>
                <EmailAddress>[email protected]</EmailAddress>
                <Attributes>
                    <Name>Fname</Name>
                    <Value>Eliot</Value>
                </Attributes>
         </Subscribers>
           <Subscribers>
           <PartnerKey xsi:nil="true"/>
           <ObjectID xsi:nil="true"/>
           <SubscriberKey>999992</SubscriberKey>
                <EmailAddress>[email protected]</EmailAddress>
                <Attributes>
                    <Name>Fname</Name>
                    <Value>Sam</Value>
                </Attributes>
         </Subscribers>
             <Subscribers>
           <PartnerKey xsi:nil="true"/>
           <ObjectID xsi:nil="true"/>
           <SubscriberKey>9999913</SubscriberKey>
                <EmailAddress>[email protected]</EmailAddress>
                <Attributes>
                    <Name>Fname</Name>
                    <Value>Josh</Value>
                </Attributes>
         </Subscribers>       
       </Objects>
      </CreateRequest>
   </s:Body>
</s:Envelope>

Personalization

Regarding your other comment:

Binding template variables must be done via AMPScript, doing lookups to the Synced Data Extensions, which makes creating the templates much more complex and error-prone.

You don't actually need to use AMPscript here. You can simply use personalization strings. For example, pass through Subscriber Attributes (which will be stored as Subscriber Profile Attributes or as fields in a Triggered Send DE), then just include the personalization string in your email, i.e. %%Fname%% in the above request envelope.

Scheduling

You should be able to schedule the email to be sent by using Send Throttling. Note that I have included SendWindowOpen, SendWindowClose and SendLimit elements in the request envelope. The send time is based on the time in the Business Unit. The SendLimit is optional and will throttle the number of emails sent each hour. Refer to documentation to learn how the send throttling feature works.

6
  • So you're suggesting using Triggered Sends for this use case? What about the scheduling? How would you achieve it with a simple approach for Triggered Sends? Jul 24, 2018 at 9:31
  • 1
    The scheduling would need to be done in Apex (you mentioned that you have already coded all the scheduling logic), so you batch your requests at the time that emails should be sent to a given set of Subscribers. Jul 24, 2018 at 9:43
  • True. I need to catch up with how Triggered sends fully work. Thanks for the heads up :) Jul 24, 2018 at 9:52
  • After further thought, you should be able to 'schedule' the email send using send throttling. I've updated my answer with this information. Jul 25, 2018 at 2:22
  • 1
    Hi @JavierGarcíaManzano, that REST API method can only be used to send to a single subscriber, I thought you wanted to send to multiple subscribers in a single request? If so, SOAP is the only option today. Jul 26, 2018 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .