0

I don't have the developer resources, nor the technical know-how to do soap/rest api calls from our website to set up Marketing Cloud triggered sends (future state is to get these set up).

In the meantime, I'm trying to accomplish this scenario within Journey Builder: Send a purchase recap from the previous day.

Customer purchases 2 items yesterday Send 1 email with 2 items listed via the lookuporderedrows ampscript function. That's the 'easy' part.

However, I can't seem to get the ampscript to be limited to pulling matching rows with given date parameters so that if a customer purchases 2 items on Today - 2 days and 1 item on Today - 1 day they will get an email that is reflects their previous day's purchases.

Anyone have any use cases of mocking a triggered send in Journey Builder?

1 Answer 1

5

The easiest way (in my opinion) is to use Postman for doing SOAP calls.

Here's a sample SOAP envelope from Postman for triggering an email:

<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:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To>
        <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <o:UsernameToken>
                <o:Username>
                    <!-- API USERNAME GOES HERE -->
                </o:Username>
                <o:Password>
                    <!-- API PASSWORSD GOES HERE -->
                </o:Password>
            </o:UsernameToken>
        </o:Security>
    </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>
                <Client>
                    <ClientID><!-- MID GOES HERE --></ClientID>
                </Client>
            </Options>
            <Objects xsi:type="TriggeredSend">
                <Client>
                    <ClientID><!-- MID GOES HERE --></ClientID>
                </Client>
                <PartnerKey xsi:nil="true"></PartnerKey>
                <ObjectID xsi:nil="true"></ObjectID>
                <TriggeredSendDefinition>
                    <PartnerKey xsi:nil="true"></PartnerKey>
                    <ObjectID xsi:nil="true"></ObjectID>
                    <CustomerKey><!-- TRIGGERED SEND EXTERNAL/CUSTOMER KEY GOES HERE --></CustomerKey>
                </TriggeredSendDefinition>
                <Subscribers>
                    <PartnerKey xsi:nil="true"></PartnerKey>
                    <ObjectID xsi:nil="true"></ObjectID>
                    <EmailAddress><!-- EMAILADDRESS GOES HERE --></EmailAddress>
                    <SubscriberKey><!-- SUBSCRIBERKEY GOES HERE --></SubscriberKey>
                    <Attributes>
                        <Name><!-- ATTRIBUTE NAME 1 GOES HERE --></Name>
                        <Value><!-- ATTRIBUTE VALUE 1 GOES HERE --></Value>
                    </Attributes>
                    <Attributes>
                        <Name><!-- ATTRIBUTE NAME 2 GOES HERE --></Name>
                        <Value><!-- ATTRIBUTE VALUE 2 GOES HERE --></Value>
                    </Attributes>                    
                </Subscribers>
            </Objects>
        </CreateRequest>
    </s:Body>
</s:Envelope>

Postman1

Postman2

You'll need to POST the SOAP envelope to the endpoint for your account, depending on what stack it's associated with. This example is posting to Stack 1:

https://webservice.exacttarget.com/Service.asmx

The other stacks have the stack identifier in the URL (e.g. s6):

https://webservice.s6.exacttarget.com/Service.asmx

Be sure and set the content type parameter to text/xml as outlined in the second screen grab.

A couple of other things about Postman:

  • Environments are for assigning variables that can be added to your scripts
  • Collections are just groups of scripts

For your work-around until you've got your dev team involved, I'd recommend a file-drop Automation, not a Journey.

  • Import and update data in a data extension (includes an insertDate field that's not part of the import file and is defaulted to today's date) -- a data extension named Purchases for example
  • run a query to identify distinct subscribers in Purchases inserted today, resulting in a new, sendable data extension called Purchases_Send
  • your send definition would have Purchases_Send as the sending audience
  • in the email code, do a lookup for by the customer's email address or subscriber key and iterate through all of the rows in the Purchases data extension. Inside the loop compare the order date to today's date (e.g. now(1)). If it's inside the range, display it.
5
  • This is helpful for the 2nd stage of what needs to happen. However, until I can get my developer team to jump into the backend of our site, I am stuck with data imports that happen on an hourly, or daily cadence. Nov 7, 2018 at 15:35
  • 1
    Updated my answer above to address the second part of your question. Nov 7, 2018 at 19:55
  • Would a unique identifier need to be pulled into Purchases_Send as a primary key (apart from a _subscriberkey)? I would reckon so since the query will run on a daily automation and inject new records into the data extension for Evaluation & Acceptance in the journey. Also, making an assumption that re-entry criteria would need to be 're-enter anytime' and record evaluation would only be happening on new records. Nov 7, 2018 at 22:44
  • Yes, there'd need to be a subscriberkey+order_number+sku or something like that as the primary key. Why use Journey Builder? Nov 8, 2018 at 0:40
  • better to use automation studio with a file drop and direct email activity? Nov 8, 2018 at 1:50

You must log in to answer this question.

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