4. 4
Today’s Meetup Speaker
Akshay Lad
System Analyst at Hexaware Technologies
● Mulesoft Certified Integration Architect & Mulesoft Certified Developer(Mule 3 & 4) who
holds total 5.5 years of experience working on Mule 3 & 4, Java & SpringBoot.
● Currently, working with one of major Healthcare Service provider and has architected,
designed & implemented various integration solutions.
● Lead many projects integrating with Salesforce Sales Cloud, Marketing Cloud, Big Query,
etc.
5. 5
● Both the speaker and host are organizing this meet up in individual capacity only. We are not representing our companies here.
● This presentation is strictly for learning purpose only. Organizer/Presenter do not hold any responsibility that same solution will
work for your business requirements also.
● This presentation is not meant for any promotional activities.
● This meeting will be recorded and shared.
Safe Harbour Statement
7. 7
● Marketing Platform by Salesforce to support various
facets of marketing
● Initially developed by ExactTarget later acquired by
Salesforce
● Benefits -
o Unified Platform for delivering relevant &
seamless customer experience
o Intelligence & Tools to build Personalised
journeys across channels & devices
o Enables businesses to deliver the right
message at right time throughout the various
phases of the relationship
o Increased customer loyalty
o Tools/Data to measure & quantify the success
of the Marketing efforts
What is Marketing Cloud?
8. Types of Objects in Marketing Cloud
● There are 3 types of objects available in the Marketing Cloud –
○ Standard Objects – Include system objects like Account, Subscribers, Email, etc.
Mostly contain information about customers who have opted to receive
communication.
○ Data Extensions – These are simply a table which contains subscriber or related
data which can be used as a source to run queries on, pull information, and send
marketing promotions to the subset of subscribers in Marketing cloud. It is better to
use data extensions over standard objects as they are more flexible & we can
connect Des with the CRM(like Sales cloud) as well.
○ Data Views – These are system-generated tables which contain information about
events & behavioural information like email sends, email opens, emails forwarded or
links clicked, etc.
10. 10
● We have 3 ways to connect with Marketing Cloud programmatically –
○ REST APIs
○ SOAP APIs
○ Mulesoft Marketing Cloud Connector
● Mulesoft Marketing Cloud Connector internally leverages SFMC’s SOAP API operations.
● We will focus on SOAP & Mulesoft connector in this session.
Note: Marketing Cloud REST APIs don’t cover all operations i.e. no like to like replacement of
SOAP APIs.
● To use any of this method we need an authentication method. Marketing cloud gives us 2 methods of
authentication –
○ Basic Authentication – Using username & password
○ OAuth Authentication – Create API integration installed package (gives Client ID & Secret)
■ Installed package is simply an app that has access to Salesforce data.
■ This is similar to Connected Apps feature provided by Anypoint Platform which enables external app to
integrate with Anypoint Platform using Oauth.
How to connect with Marketing Cloud?
14. ● We will discuss following use cases today –
○ How to import data to the Marketing Cloud?
■ How to Create a Data Extension programmatically?
○ How to extract data from the Marketing Cloud?
■ Retrieving data from Data Extensions
■ Retrieving data from Data Views
■ Retrieving data from Standard objects
○ How to get attributes of Data Extension?
Use Cases
15. ● We can use REST API for importing data into Marketing Cloud Data Extension.
● Rest endpoints are available for both synchronous & asynchronous operations.
● Input data should be in JSON format.
● In case of successful operation,
○ of sync call, we will get input data as response whereas
○ for async call we will get a request id using which we can track the status of import.
● If there is some error in input data, we directly get an error response with 400 status code.
● As we need to send input records as a payload, only limited records can be imported at a time.(For
sync, max payload size is 5MB.)
● Also, we need to honor the rate limiting imposed by SFMC.
Import Data to SFMC using REST APIs
16. Import Bulk Data Asynchronously
● Perform method can be used to import data
asynchronously.
● Customer Key & ObjectID of target DE needs to
be specified in the request.
● CSV files with any delimiters are supported.
● Rest APIs also expose import functionality for
Json input.
● To know the status of import we can query on
ImportResultsSummary object.
Advantages -
● Async operation
● Gives status notification via email
● Multiple delimiters supported
● Different Import types supported –
1. Add and Update, 2. Overwrite
3. Add and Do Not Update
4. Update But Do Not Add
17. Create Data Extension Programmatically
● We may need to create Data Extension object programmatically
before we perform import.
● SFMC provides Create operation which can be utilized to create a
Data Extension object.
● Mulesoft OOTB connector also exposes this operation with name
Create Entities.
● We can specify different fields, their data types, constraints(like
max length in case of text field), whether field is primary key or not,
is it mandatory field, etc. properties while creating an object.
● We can also specify location/folder in which Data Extension is
created using CategoryID field. If it is not specified, new Data
Extension gets created in default/root folder.
● We can also specify Customer Key. It should be kept in mind that
Customer Key should not be more than 36 characters(though it
accepts more characters than that!).
● It is also possible to update existing field or add a new field to
existing DE using Update method.
18. Retrieve Data from Data Extensions
● Data in CSV format can be exported using Extract operation of SOAP APIs.
● We can specify name of output file, delimiter in the request.
● File gets exported in Export directory of Safehouse.
● Advantages –
1. Async operation, 2. File can be exported with different delimiters
● Disadvantages –
1. Exported file is in UTF-16 encoding, 2. Specific attributes can’t be exported, 3. Filtered results
can’t be extracted
19. Retrieve Data from Data Views
● We can use same extract operation with different
parameters to retrieve data from Data Views(Clicks,
Email Opens/Sents etc.).
● Data gets extracted in Safehouse in zipped format.
● Also, by changing values in start & end dates in the
request we can get data for specific time period.
● We can also extract data of multiple Data Views
using single request.
20. Retrieve Data from Standard Objects
● To extract data out of Marketing Cloud
Standard objects we can use Retrieve method
of SOAP API or we can query using Retrieve
entities operation of OOTB connector.
● Retrieve method gives us 2500 records at a
time, so if there are more records than this, we
need to call Retrieve operation again with the
request id returned in the earlier response.
● OOTB connector handles this internally
however in case of large volume of data it will
become slow & may result in out of memory
errors if not handled correctly.
● Advantages – We can select specific
attributes. Same method can be used to extract
data extension objects.
● Disadvantages – If there are large number of
records, we may need to iterate multiple times
to retrieve whole result.
21. Get Attributes of Data Extension Object
● We can get attributes/field names of a Data
Extension or Standard object.
● SFMC stores all attributes related information
in a DataExtensionField object.
● We can query on this object using customer
key of a Data Extension as filter condition to get
the list of attributes present in Data Extension.
● We get type of field, its default value, whether it
is primary key or not & other properties.
● For standard object we need to use Describe
method.
24. 24
● All Questions will be Multiple Choice Questions.
● Respond answers in Chat Window.
● First correct answer for every question will be the winner for that question
● One voucher per month - Across All Meetups
● Note for Trivia Winners:
■ Make sure the host has your full name, email address and linkedIn profile before leaving
■ Voucher sent to winners within 10 days
Trivia Rules
25. 25
Which of the following is one of the feature provided by Marketing Cloud?
a. Design Studio
b. Marketing Studio
c. Mobile Studio
d. SMS Studio
e. Messaging Studio
Questions 1:
26. 26
Which of the following object stores result of Import operation?
a. ResultsObject
b. ImportResultsSummary
c. ImportStatus
d. OperationStatus
e. Operation Results
Questions 2:
27. 27
Which of the following is not type of object in Marketing Cloud?
a. Standard Objects
b. Data Extensions
c. sObjects
d. Data Views
Questions 3:
29. 29
● Share:
○ Tweet using the hashtag #MuleSoftMeetups #MuleMeetup
○ Invite your network to join: https://meetups.mulesoft.com/baltimore/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
● Nominate Yourself as Meetup Speaker:
○ Amazing opportunity to public speaking, broadening skills and expanding network
Knowledge Shared is Knowledge Squared!