Automating Salesforce Marketing Cloud - Greg Gifford - E-Book

Automating Salesforce Marketing Cloud E-Book

Greg Gifford

0,0
45,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Salesforce Marketing Cloud (SFMC) allows you to use multiple channels and tools to create a 1:1 marketing experience for your customers and subscribers. Through automation and helper tasks, you can greatly increase your productivity while also reducing the level of effort required in terms of volume and frequency.
Automating Salesforce Marketing Cloud starts by discussing what automation is generally and then progresses to what automation is in SFMC. After that, you’ll focus on how to perform automation inside of SFMC all the way to fully running processes and capabilities from an external service. Later chapters explore the benefits and capabilities of automation and having an automation mindset both within and outside of SFMC. Equipped with this knowledge and example code, you'll be prepared to maximize your SFMC efficiency.
By the end of this Salesforce book, you’ll have the skills you need to build automation both inside and outside of SFMC, along with the knowledge for using the platform optimally.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 663

Veröffentlichungsjahr: 2022

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Automating Salesforce Marketing Cloud

Reap all the benefits of the SFMC platform and increase your productivity with the help of real-world examples

Greg Gifford

Jason Hanshaw

BIRMINGHAM—MUMBAI

Automating Salesforce Marketing Cloud

Copyright © 2022 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Alok Dhuri

Publishing Product Manager: Richa Tripathi

Senior Editor: Nisha Cleetus

Content Development Editor: Nithya Sadanandan

Technical Editor: Pradeep Sahu

Copy Editor: Safis Editing

Project Coordinator: Deeksha Thakkar

Proofreader: Safis Editing

Indexer: Manju Arasan

Production Designer: Vijay Kamble

Marketing Coordinator: Deepak Kumar

First published: March 2022

Production reference: 4120822

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80323-719-0

www.packt.com

I dedicate this book to my wonderful wife and spectacular son, who make my life infinitely better every day. I also dedicate this book to the wonderful Salesforce Marketing Cloud community, which has helped me grow to where I am today.

– Greg Gifford

This book is dedicated to my wonderful partner and children, who inspire me to push the boundaries of what's possible in my career and life. Without them, none of this would be possible.

– Jason Hanshaw

Foreword

I remember when I first saw the post from Greg about this book. It was big news. Very big news. I watched as the marketing community responded with excitement. I was excited. Finally, a book that goes deeper into the root of automation in Salesforce Marketing Cloud (SFMC).

While this is a technical book, calling it that does it a disservice. Sometimes the word technical can be pretty scary and off putting, especially a technical book. We think: stuffed with big words, convoluted examples that confuse you, and obscure terms that make you want to give up. Thankfully, that's not what you'll find in this book. The authors have conquered the difficult challenge of writing a book that clearly explains the intricacies of automation in Salesforce Marketing Cloud, which will make you want to challenge your original views on automation. The authors don't talk down to you. They haven't rushed through chapters. They haven't assumed you are an expert. They have written this book with one thing in mind - helping all practitioners who want to increase their knowledge of automation theory and the applications of SFMC.

Each page of this book will help you get there, one actionable step at a time. This book is full of tangible examples, new ideas, snippets of code, and practical tips to build your automation muscles. You can see the level of research coming through in the content. So powerful, so refined, so right on point, and so needed. This book doesn't rush through the concept. It's about forming and understanding a much deeper level the power of automation – what automation is, and how to approach it programmatically. Whether you're new to Salesforce Marketing Cloud, or are an experienced practitioner, you'll come away with fresh insights and effective guidance to help bring you right back on track, with added confidence.

Guilda Hilaire

Director, Product Marketing

Salesforce, Inc.

Contributors

About the authors

Greg Gifford, also known as Gortonington inside the Salesforce Marketing Cloud community, is a Salesforce MVP, Salesforce Marketing Champion, Trailblazer Community Group Leader, and a subject matter expert on the platform. As founder and managing director of HowToSFMC.com, Greg has made a large investment in the community and has striven to create a nurturing and learning-focused environment. Greg is also the owner and author of a blog, gortonington.com, where he posts interesting things he learns about Marketing Cloud or any other helpful tips or advice he can share. Greg is also very active on Salesforce Stack Exchange and is currently the top Marketing Cloud contributor of all time there under his alias, Gortonington. Greg is currently employed at Merkle as the director of SFMC engineering.

Jason Hanshaw is a Salesforce Marketing Cloud engineer with extensive experience in building solutions for the platform. A former web developer, he brings a background in web application development to Marketing Cloud in order to build innovative solutions that extend capabilities and meet complex needs. He is the author of the blog InvokeCreate.dev where he shares project-based examples for getting the most out of the platform. Jason is an avid contributor on Stack Exchange and within digital marketing communities, and is always seeking to grow his knowledge and share his own with others.

About the reviewers

Cameron Robert is a marketing and automation subject matter expert from Australia. He is a Salesforce Certified Expert, Salesforce Marketing Champion 2020-2021, Trailblazer Community Group Leader, and a YouTube and blog content creator, as well as contributing to the Salesforce Marketing Cloud community wherever possible.

Specializing in implementation and enablement, Cameron has helped numerous businesses adopt Marketing Cloud and realize value from their projects. He is passionate about helping new users to onboard and unlock the full potential of Salesforce Marketing Cloud.

Jason Cort is a 4x Salesforce Certified CRM Technology specialist with 12+ years' experience across multiple platforms. With a primary focus on Salesforce Marketing Cloud, he has been a Salesforce Marketing Champion since 2020 and is one of the co-founders of HowToSFMC.com, where the community shares advice and tips for making the most of Salesforce Marketing Cloud and much more. Jason has presented webinars covering email deliverability and Salesforce Marketing Cloud functionality and has delivered presentations at email industry events including Litmus Live. He has worked in a range of industries, both on the brand side and as a consultant, and is a passionate advocate of making technology work harder to enable users to work smarter and more effectively.

Shibu Abraham is a Salesforce MVP and a Marketing Champion. Shibu currently heads the APAC Salesforce Practice for UST, a Crest Partner of Salesforce. He is also an Agile Champion and holds numerous certifications from both Salesforce and the Agile community. He also leads the Marketing Cloud Trailblazer Community Group in Malaysia. He is a big fan of Lightning Web Components (LWC), marketing automation, programming in SFMC, and content creation on SFMC topics. He believes in innovation, continuous learning, and sharing knowledge about Salesforce and promotes various events for the Salesforce Trailblazer Community.

Table of Contents

Preface

Section 1: Automation Theory and Automations in SFMC

Chapter 1: What Is Automation?

Automation theory

Automation definition

Automation opportunities and pitfalls

Opportunities

Expanded opportunities

Pitfalls

Concepts of automation

Infrastructure

Triggers

Data collection

Information routing

Activity tracking

Implementation best practices

Starting small

Understanding the process

Sticking to the objective

ABD – Always Be Documenting

Documentation best practices

Summary

Chapter 2: SFMC Automation Tools

Salesforce Marketing Cloud

The ExactTarget years

Salesforce acquisition

Multi-channel and cross-channel marketing

Multi-channel marketing

Cross-channel marketing

Marketing Cloud evolves beyond email

Automation tools in Marketing Cloud

Marketing Cloud tools

Journey Builder overview

Single Send journeys

Transactional Send journeys

Multi-Step journeys

Journey Builder configuration overview

Journey entry events and activities

Journey Builder considerations and best practices

Automation Studio overview

Scheduled automations

File drop automations

Automation Studio activities

Comparing Automation Studio and Journey Builder

The key differences

Which one should I use?

With our powers combined

Automation Studio and Journey Builder interactions

Summary

Chapter 3: SFMC Automation Best Practices

Best practices

Establishing a best practice

Maintaining best practices

Keep it simple, stupid (KISS)

Creating high-quality testing

Testing woes in Salesforce Marketing Cloud

Creating test versions in your production business unit

Creating a sandbox business unit

Developing and testing outside Marketing Cloud

Performance and efficiency in your architecture

Will the solution solve the problem?

Is the solution your best path forward to meet your needs?

Does this solution consider all future scenarios?

Can your solution handle triple the volume and frequency that's currently expected?

Is the solution fully planned out and developmentally sound?

Is efficiency greater than performance?

Why are we not certain?

Is efficiency better than performance?

Best practice is not always best

Context matters

Subject matter experts don't know everything

Do research and testing

You (your preferences) matter

Imposter syndrome

Trust yourself

Your situation matters

Summary

Section 2: Optimizing Automation inside of SFMC

Chapter 4: Automating Email Sends

Email marketing automation overview

Real-time versus scheduled

Real time

Scheduled

Real time or scheduled – which is the right choice?

1:1 messaging versus batch sends

1:1 messaging

Batch messaging

Batch or 1:1? Why not both?

Analytics-powered insights

Analytics in Marketing Cloud

Considerations regarding email automation

Summary

Chapter 5: Automating Your ETL and Data

What is ETL?

Extract

Transform

Load

How is ETL used?

Activities for data in Automation Studio

SQL Query activities

What is a SQL Query activity?

Uses of the SQL Query activity in automation

Filter activities and data segmentation

Filters

Groups

Filtered mobile lists

Import data options

Export data options

Data extract

File Transfer activity

Tracking extract

Summary

Chapter 6: The Magic of Script Activities

Technical requirements

Script activities (SSJS and AMPscript)

AMPscript inside of a Script activity

Overview of SSJS in Marketing Cloud

What is SFMC SSJS in a nutshell?

Oh, the possibilities! (What you can do in SSJS)

Arrays and objects

Functions in SSJS

try…catch in SSJS

More capabilities than we can mention

WSProxy

A real-life example implementation

Setup

Functions

Global variables

allTriggers logic

for loop

The upsert

Summary

Chapter 7: The Power of In-Step APIs

What are APIs?

The REST and SOAP APIs

Authentication

The SOAP API in Marketing Cloud

The REST API in Marketing Cloud

SFMC native functions and WSProxy

AMPscript

Server-side JavaScript

WSProxy

Script.Util for the REST API

HttpResponse

HttpGet

HttpRequest

Why is this important?

External services

Example 1

Example 2

Example 3

Example 4

Summary

Chapter 8: Creating Mini Web Apps

Technical requirements

What is a web app?

Creating a Marketing Cloud web app

Setup and administration

Installed packages inside Marketing Cloud

API component and scope

CloudPages

Example implementation

Automation Dashboard

The full code

The SSJS

The HTML and CSS

Client-side JavaScript

The power is yours!

Summary

Section 3: Optimizing the Automation of SFMC from External Sources

Chapter 9: Getting Started with Custom Integrations

The who, what, and why of custom integrations

Out-of-the-box solutions

Custom integrations

Have your cake and eat it too – combining approaches

Building your integration toolbox

ETL, ELT, and Reverse ETL

Point-to-point integrations versus hub-and-spoke integrations

Point-to-point integrations

Hub-and-spoke integrations

The paradox of choice – finding the right tools

Know your limits

Setup and next steps

Summary

Chapter 10: Exploring SFMC as a Piece of the Puzzle

Technical requirements

Knowing about your process flow

Identifying owners and key players

Putting pen to paper

Defining a use case

Understanding the lightning component framework

Building our lightning component

Understanding the importance of structure

Model

View

Controller

Testing, testing, and more testing

Creating specific tests

Summary

Chapter 11: Exploring SDKs, APIs, and Specs

Understanding APIs

Open APIs... what does that mean?

Partner APIs... a little closer to the vest

Internal APIs... all in the family

Composite APIs… with our powers combined

Requests and protocols – a deep dive

SOAP – not the kind you use in the shower

REST – but not a nap

GraphQL – making data easier

To SDK or not to SDK

APIs versus SDKs

Marketing Cloud platform SDKs

Summary

Chapter 12: Webhooks and Microservices

Technical requirements

Webhooks versus APIs

An event-based example

Configuring the GitHub webhook

Setting up the endpoint

Microservices, assemble!

Advantages of monolithic architecture

Disadvantages of monolithic architecture

Advantages of microservices architecture

Disadvantages of microservices architecture

Summary

Chapter 13: Exploring Custom Journey Builder Activities

Technical requirements

An overview of the required files and structures for Journey Builder

Setting up your package and environment

Setting up your application in Heroku

The Marketing Cloud custom activity configuration

Exploring configuration and activity UI

The config.json file

The index.html file

Using the Postmonger events and payloads

Implementing handlers and authentication

Utilizing logging

Summary

Section 4: Conclusion

Chapter 14: Carpe Omnia

Lessons we've learned so far

Final lessons and examples

Calling an automation from another automation

Creating automated scripts with Heroku Scheduler

How and why to use Heroku Scheduler

Last-minute tips and tricks

Summary (adieu and auf wiedersehen)

Other Books You May Enjoy

Section 1: Automation Theory and Automations in SFMC

In this first section, you will get an understanding of the main ideas behind automation theory and the automation-related components inside of SFMC.

This section contains the following chapters:

Chapter 1, What Is Automation?Chapter 2, SFMC Automation ToolsChapter 3, SFMC Automation Best Practices

Chapter 1: What Is Automation?

Automation is something that has become so ingrained in our society that we almost take it for granted. It is in our daily activities and helps us to achieve so many of our wonderful and innovative inventions. The odd thing though is that despite automation being such a day-to-day thing, not many people can actually explain what it means or where it came from. To help get us all in the right mindset, we first wanted to go over what exactly automation and automation theory are.

In this chapter, we will cover the following topics:

Automation theory: A dive into the history of automation, the theory behind why automation is useful, and how it should be usedDefining automation: Solidifying the meaning behind our focus in the book by defining exactly what an automation isAutomation opportunities and pitfalls: A broad overview of the different benefits and potential risks that go along with automationConcepts of automation: Basic concepts related to automation and the areas they affectImplementation best practices: Some basic best practices related to automation when looking to implement itAlways Be Documenting (ABD): A case for why you should be documenting each automation and solution you create

With this knowledge, we will be prepared to move forward and fully digest the automation capabilities and possibilities related to Salesforce Marketing Cloud, as discussed further in this book.

Automation theory

In some ways, automation theory is a self-feeding theory in that as each advancement happens, it will use that step as a building block to making further advances to larger and more significant feats. This means that before we dig into the exact meaning of what automation is, we should look at the history of automation and automation theory over the years. This rich history is what built the automation theory and capabilities that we know and love today, and will give great insight into the future of automation as well.

From the development of the first computer, all the way to recent advances in AI, automation theory has had a significant and life-altering impact on humanity and history. Each one of these developments and inventions has helped forge the way for further automation and efficiency in an exponential way. These advances have created a steady push forward to remove all the manual aspects of any activity or process to help improve the speed, efficiency, and possibilities of the results.

We could probably even go all the way back to the very beginnings of mankind's rise to find the roots of automation theory. The very first automation could have been something as simple as the repeating loop our roaming ancestors took when hunting and/or gathering or even utilizing a tool or their environment to remove repetitive actions in their day-to-day life. Automation does not need to involve technology as we view it today!

Without automation theory, the computer would never have existed, changing the entire world we live in today. And that is only the most recent example of how automation has changed our lives. Look at the world's first moving assembly line for mass production created by Henry Ford (https://corporate.ford.com/articles/history/moving-assembly-line.html). Without that innovation, our entire world would be irrevocably different.

Automation theory has helped advance and shape technology and theories throughout the years, including such recent advances as the following:

Control functions (electronic digital computer)Programming languages and capabilities (computers and machines)A vast array of sensor technology (light, electromagnetic, kinetic, and so on)Advanced mathematical theory of control systems (evolved during WWII)Artificial intelligence (robotics and learning systems)

These advances have set the stage for the highly interconnected and digital world that we experience today. The simultaneous development and maturation of many technologies, in particular, information technologies, have enabled vast levels of interdependence and communication between previously disparate systems that were impossible before. While not a new feature of this development, automation has recently taken center stage in discussions about the future of business, communication, production, and many other aspects of our lives.

To help understand this, we wanted to provide a quick visual representation of automation theory as just described.

Figure 1.1 – Visual representation of automation theory

Now that we have a strong understanding of the history of automation and how it has affected our lives, let's figure out what exactly it is.

Automation definition

The dictionary defines automation as the technique of making an apparatus, a process, or a system operate automatically (Merriam-Webster: https://www.merriam-webster.com/dictionary/automation). That's a bit generic for our purposes, so let's consider it in an IT context so that we can make that more applicable to this domain. Automation is the use of repeated instructions to create a process that replaces previously used human intervention in order to accomplish a task. There, that's a bit better, right?

It has become a buzzword in our modern era, and its application has re-shaped the ways that we interact and live within our world. From home appliances to robotic rovers on other worlds, automation has found its way into the fabric of our technical and social world. In a world driven by speed, connectivity, and efficiency, it's not hard to see why it's become such a central focus of many organizations and technologies today.

One of the more obvious consequences from this transformative concept, and one relevant to this book, has been the dramatic shift in the ways that both business and individuals communicate and interact with each other in emerging digital spaces. As the rate at which aspects of our lives occur within these spaces increases, so has the expectations for instantaneous communication and services tailored to the personalized needs of individuals.

This has presented challenges for sure, but has also created tremendous opportunities for organizations that have embraced this digital transformation and have sought to redefine their business and processes to operate in this space.

This digital transformation has been critical for businesses to meet emerging customer demands and expectations, and has become a requirement to compete in this new global, digital world. This does not come without cost, however, and businesses today must be more cognizant than ever before of how their organization uses technology, both internally and externally.

One of the key components and performance multipliers in digital transformation is automation. Incorporating automation as a central feature in business processes, aside from introducing an innovative mindset to an organization, introduces efficiency in costs and performance that can have dramatic impacts when well planned and thoughtfully applied. In that vein, let's move onward to learn about the different opportunities and pitfalls that come along with automation.

Automation opportunities and pitfalls

Before diving further into the concept of automation, it's helpful to consider exactly why it can be such an important component of business processes and what risks are associated with its implementation.

First, automation is essential for reducing both financial and productivity costs associated with repetitive, time-consuming, and error-prone tasks. These could range from manual data-entry processes to complex monitoring or communication activities. In addition to its impact on these sorts of tasks, when well planned, it can introduce a single standard of quality that can be replicated and adhered to over time.

Opportunities

Let's take a deeper look into the benefits that can be extracted from incorporating automation into your business processes. First, I wanted to start with a quick visual to show the benefits and then from there, we will dive deeper into each aspect.

Figure 1.2 – Visualization of the benefits of automation

As you can see in each of the bars from the visual, there are a ton of great opportunities available. Now, let's take a deeper dive into these benefits.

Increased efficiency

One of the simplest benefits of incorporating automation is that it increases the efficiency with which tasks or events can be completed. When repetitive or time-intensive tasks are eliminated, it frees up resources to do more innovative and impactful work. This provides an immediate cost benefit as resources can be allocated to other impactful projects while also reducing the strain on employees, all without a loss in productivity.

Its impact in a customer-facing context can be even more beneficial. As customers demand real-time engagement and services, being able to meet them in the moment is critical. Whether it's automated communication for a password reset request, or a one-click online checkout, creating sustainable automated processes that can deliver on customer requests immediately is a massive benefit and has become an expectation in our digital world.

More reliable solutions

When it comes to any solution or project, consistent and reliable quality is an important factor for success. With manual solutions, where human input and decision making are ever-present and necessary for the completion of a task, there are risk factors that will inevitably impact the overall stability and reliability of the performance. Humans, while our capacities for attention and skill are prodigious, are subject to factors that will reduce work quality and performance. Whether it's a poor night's sleep, long periods of intense focus, or multi-tasking, attention to detail and performance will vary across individuals and circumstances.

This limitation provides an opportunity for automation. A well-defined, automated process suffers from no degradation of attention, nor experiences performance dips due to fatigue or distraction. In an interconnected global space, having an automated system that can operate 24 hours a day to meet challenges and complete tasks is important to a process that needs to be responsive on demand.

Expanded opportunities

While not initially apparent, automation can actually improve efficiency and productivity across teams in an organization by exposing the nature of your current business processes. Before a system can be automated, those underlying processes must be thoroughly analyzed in order to both define opportunities where automation is feasible and to define what it's meant to accomplish.

By exposing these underlying procedures, it encourages conversations about the current goals and future state of the program, which can help improve the overall quality and foster innovation.

In addition to this, automation can work as a centralizing force for many disparate processes that may otherwise be isolated and poorly understood. By combining data and workflows into a centralized system that is capable of both producing and receiving input or completing a task, you can act on events automatically and extend the capabilities of your solutions while increasing productivity.

Pitfalls

Now that we've covered just a few of the benefits that automation can bring to an organization, it's important to also consider the potential risks or downsides that can come from incorporating this as well.

High initial investment

It has been said that nothing in life is free and automation, unfortunately, is no exception.

First, there are the obvious financial costs that come with implementing automation solutions. Whether it's purchasing cloud storage, training for teams to learn new skills and adjust to new workflows, or just the amount of planning and development needed to implement the solution, the decision to automate a process should not be taken lightly.

Secondly, it is important to consider the opportunity and productivity costs that take away from other current or planned initiatives. Attention is a finite resource and draining it for a new initiative comes at the expense of other priorities.

When you carefully consider the amount of planning, development, testing, documentation, and training that can go into proposed automation, it can become daunting to undertake for some, and perhaps impractical for others.

Less ability to pivot quickly

We all know it's a perfect world, and all your solutions and initiatives are performing so well it's time to just set it and forget about it, right? Er, maybe not.

Even with the proper planning and strategies when developing automated solutions, unexpected shifts can leave your well-defined process at a disadvantage. Perhaps it's an urgent marketing need, or a new legal requirement that must be implemented to stay compliant, but automation can make you inflexible at an inopportune time.

By their nature, automated solutions are likely narrow and well-defined, which can leave them vulnerable to sudden shifts in goals that invalidate the existing implementation.

You get out what you put in

It seems self-explanatory, but your solution is only as good as the strategy and the team behind it. Failing to adequately account for edge cases, resourcing, stable deployment processes, or any number of other factors in the project life cycle can have a significant impact on the overall performance of the automated solution.

While it's been noted that automation can increase the stability and quality of your workflows, it should be remembered that you get out what you put into it and poorly designed automation can cascade issues much more dramatically than a manual process.

Now that we've taken a look at some of the general advantages, and disadvantages, of automation, let's take a look at some select core concepts so we can get a better grasp of what automation looks like exactly.

Concepts of automation

Many individual concepts within automation help define what it encompasses technically. In this section, let's focus on a few that are more applicable to common business scenarios or solutions within Software as a Service (SaaS).

To help visualize these concepts, please reference the following diagram:

Figure 1.3 – Visualization of the concepts of automation

Now that we have seen the visualization, let's take a deeper dive into exactly what these concepts mean.

Infrastructure

This is an important piece of the automation puzzle, and one not to be taken lightly. Thankfully, most SaaS will largely take care of this issue upfront. You begin provisioned with a powerful cloud solutions environment that can scale to your needs and contains robust APIs for interacting both internally and externally with the platform. Problem solved? Yes, but also no.

First, let's explore exactly what an API is. API is an acronym for Application Programming Interface, which is basically a middle software that allows two applications to talk to each other. APIs are essentially messengers for your two applications. I like to view it as if the API is a phone call between two friends. You can share information, receive information, make plans, cancel plans, and more via a phone call. Although you each have phones, voices, and so on, without the connection provided by the call, the API, you could not connect and communicate these messages without direct interaction. Now, back to the SaaS infrastructure.

While most SaaS platforms do resolve a lot of issues around provisioning and configuration, it may only be a piece in your larger workflow. Perhaps there is a business need for automating some communication with an external service at dynamic points in a customer life cycle? While some built-in tools can provide us with a way to track milestones in a customer journey, integrating custom services or solutions can require more complex solutions that require outside integrations.

Maybe you want to utilize your SaaS for individual functions within a larger automated workflow for your organization and not as a standalone product. Considering the road that your solutions run on is an important step in planning and designing a technical solution.

When selecting the environment that will house a given component of your solution, consider how well it integrates with the other platforms you've defined. Knowing how your systems are going to talk to each other is a key step of the planning phase and can drive the direction of your technical solution.

Triggers

Triggers are the events that flag an activity or process from some response or action by your automated solution. These can be initiated by both humans and machines and are the primary method by which your automated solution is compelled to complete some tasks.

A common form of triggers in most SaaS platforms is API entry points. Usually, when you call an API into the platform, it comes in with information that is used once the call is received (the trigger to take an action) to create a new action or process, such as returning data from the platform to the requestor.

Another example might be a form hosted on a website, and integrated with an external service or custom solution. The user triggers the event by submitting the form on the website, and an automated solution is called by that event to take some action (say, send an email confirmation).

These types of events can take many forms and differ in both type and the complexity of the action being triggered. For a webhook, like our form submission scenario above, some event is triggered automatically when an event has taken place in our environment.

Using something like an API, for instance, requires data to be requested and for a response to be generated based on the validity of that request. The main takeaway here is that we need to keep in mind that there is a wide range of possible trigger events, but the core concept remains consistent.

Data collection

Data collection often involves a form being completed, but it can also involve data being automatically extracted or received from a system. For most automated processes, the validity and robustness of your data store can define the scope or functionality of the solution.

While there are use cases where a method of data ingestion or collection is not needed, and the trigger itself is the only required source of action, most processes will require some form of data collection to generate an automated solution.

Planning how your data will be ingested and stored should be a priority when developing the flow of your automated solution. Ensuring your data store has a consistent structure and schema, and that the data you're storing is properly formatted and reliably populated, are both key to ensuring that you can retrieve it reliably when needed and that it will integrate well with your solution.

Important in this regard will be data validation, particularly when capturing or importing data from user-input or external services. Your solution will only be as good as the data you collect for it, so take care to make sure it's as clean and consistent as possible.

Information routing

Information routing involves moving data between people or systems where business rules and logic dictate where data needs to travel next. This is a common concept that can be found in solutions both internal and external to most SaaS platforms. When implementing a solution that utilizes complex data flows, containing multiple sources or destinations, understanding the routing necessary to seamlessly pull it together into a final source requires careful consideration of both your individual components and of how they depend and interrelate with one another. Sequencing, timing, and monitoring are especially critical and can be the difference between a successful or failed program.

For external solutions or those that involve multiple systems integrating within the same core initiative, it becomes even more important to understand the information routing occurring with a solution. In this scenario, you're accounting for the flows across various services that are subject to failures, timing inconsistencies, and misconfigured trigger events, among others.

Activity tracking

How can we define the success or failure of a program if we don't have a reliable way of tracking its performance against our defined goals? Tracking what happens from end to end in a process allows processes to be audited and measured in order to improve the solution or otherwise highlight points of failure that make it ill-suited for automation.

When integrating with external systems, this becomes even more critical, as there are more points for failure that must be accounted for and tracked reliably at the request level. Taking a proactive approach to logging, in addition to constructing your solution for ease in reporting and accountability, can help mitigate missed errors that propagate or obvious points for remediation and revision.

With these core concepts in hand, let's take a look at some common best practices to consider when building automated solutions.

Implementation best practices

As we've indicated previously, while automation can be a powerful multiplier for efficiency and productivity, there are no guarantees. Poor planning or implementation can lead to solutions that fail to meet the need at hand or, worse, negatively impact your initiatives as a whole. While many important aspects of the automation development life cycle can dictate the overall success of the project, by far the most important step is planning and strategy.

Moving forward without a clear idea on both your objectives, and detailed solutions to meet them, can lead to runaway scope, poorly designed systems, and unnecessary complexity. Let's take a look at a few best practices to keep in mind during this crucial step of the automation process.

Starting small

While it may be enticing to jump head-first into automating large and complex portions of your processes, the universally accepted best practice is to start small and target those items that will return the highest value for the lowest level of effort. Work with related teams to identify processes that are time-consuming or error-prone, particularly those that are both simple and repetitious.

Finding routine, manual processes that are low-risk and high-visibility ensures that you're both providing real value with your solution while not impacting your current initiatives in the event that something goes awry. Processes with low exception rates, that do not require human intervention, should be considered in this regard as well.

Ideally, you should consider those processes that are stable, well documented, and with well-defined risk and cost. Getting buy-in from internal teams is important as well, so looking for tasks where the savings from automation can be quantified and measured can drive support and adoption to get your solution into production.

Try and avoid the Rube Goldberg effect when an automated solution becomes so complex that no one but its creator has a hope of understanding its flow or intent. Processes that are atomic, reusable, and simple on their own are ideal.

Understanding the process

The term flying blind has a negative connotation for a reason. Approaching your planning and strategy without an adequate understanding of the systems, or processes, that you will be automating is a recipe for failure. Understanding how a given process is structured end to end, including how it operates both internally as well as with external systems, is crucial to delivering a successful solution on time. A failure to account for some factor during your planning stage can derail a project, or kill it completely, if your solution no longer becomes viable or runs over the projected costs.

Understand the process well and why each of its steps is performed in its current sequence. It is important to know why things are performed in their current state as they might not be suitable for automation, or only partially suitable. It can be counter-intuitive to automate four tasks when only two of them make sense and the other two could potentially even increase workload via automation.

Rather than fully automating in bulk, automating helpers as part of a process can be vastly more efficient than forcing a full process to be automated. Sometimes, checks and balances are required that just simply cannot be automated. Trying to force this into an automated process could greatly increase the risk or increase the level of effort on other teams to do the manual checking amid the automation, and so on.

Sticking to the objective

While automating data management, email deployment activities, or custom workflows and processes, you must always stick to the original objective outlined in your planning and strategy process. The introduction of a new business need or functionality, or new feature within the platform, can be alluring to attach to a project still in development, but it is important to stay focused on the initial needs and requirements outlined at the beginning.

By staying on track with your initial scope, you eliminate the possibilities of new additions either slowing down your implementation or derailing it altogether. Adding additional functionality in the middle of a project introduces unnecessary risks and has the potential to change the very objective of the solution you've previously outlined. So, while it might be tempting to turn your next data management process into a full-fledged machine learning solution, it's best to avoid this and to look for areas to enhance or branch for future projects.

These are just a few of the very important considerations and practices to take into account when getting started with the planning and strategy portion of the automation project life cycle. Obviously, there are other important practices to keep in mind during the development and testing phases of your project that have been touched on earlier in this chapter. One more that we should call out here is testing.

While you may think that your well-planned and developed project is immune to failure, you must identify likely exceptions and develop a testing strategy before you even begin your development. Having a solid testing plan and execution can reduce the error rate of your automation processes and can help drive more adoption and innovation across other processes in your organization.

Now, let's cover another best practice that is critical to the development and continued success of an automation project: documentation.

ABD – Always Be Documenting

You've written well-thought-out and concise code, so you don't really need to document it right? Wrong. We're all familiar with the experience of reviewing the code comprising a feature, where the nature of its structure, or even its intent, isn't immediately obvious. Worse, we may not know how it integrates with other systems or parts of the solution. By not documenting your code and configuration, and how it integrates with other parts of your solution, you've isolated the group of people familiar with it to a single person, or small team, while introducing the risk that someone may unwittingly impact your solution or services it relies on.

The primary reason that documentation is ignored is because of time, and conflicting priorities. Development doesn't occur in a vacuum, and it's not often that we have the time to stop everything and focus on documentation for our solutions. Apart from designing and development, we also have to consider unit testing, user acceptance criteria and quality assurance, and code reviews (among others).

Documentation is easily pushed to the side for other priorities, and not considered essential. In reality, it can be one of the most important factors for the final, and continued, success of a solution.

Regardless of the task you are automating, it is very likely that you or your team will have to revisit the solution at some point in the future. The purpose of certain blocks of code, exceptions that need to be considered, or even the configuration itself might have faded with time in the minds of the author and those new to the project as a whole may be completely lost. By not documenting your process thoroughly, you incur additional costs in time and effort when revisiting your solution requires additional time to unravel its meaning or purpose. Worse still is the fact that you add additional risk by missing a key component that, while common knowledge during your development phase, has been forgotten.

As developers, when approached with a new system or project, our first inclination is to likely seek out and review the documentation. Next time someone wants to understand your solution, you can simply point them to your documentation. It saves time and effort for you and gives them a helpful reference so that they can self-learn without being dependent on your time and availability.

In addition to this, documentation can make you both a better developer and team member. When working on an automated solution, it can be very easy to get tunnel-vision with a specific configuration or block of code, and how that holistically fits in with the overall structure of the project may be lost. The process of creating documentation during development ensures that you're always keeping the purpose of your project in focus, and it shapes the way that you create the individual components of your solution. There is also an easy reference for yourself, or your colleagues, that can aid in collaboration among team members and increase both the stability and quality of your solution.

Documentation best practices

Now that we understand some of the advantages of documentation, let's take a look at some best practices that will make it more useful to those reading it.

First, understand who the audience is for your documentation. Will it be other developers, or are you providing supplementary documentation for marketing or business teams? Including detailed code blocks and descriptions of their functionality may be critical for developers, but it's sure to drive away non-technical resources on your team. Structure your documentation to match the expectations of its intended audience in order for it to be both readable and effective.

Secondly, create a short, but descriptive, summary of your solution that explains the main purpose and intent of the project as a whole. This will help readers derive the purpose of the solution that you've automated as well as its relevance to their work or other business processes. Also, be sure to provide a description of the main components of your solution, noting any dependencies that may exist within your project. If your solution relies on APIs or third-party libraries, be sure to include their versions inside of your documentation as well.

Be generous with your coding examples when writing documentation for developers. Having a detailed explanation of what a given block is meant to accomplish, and how to both use and test its functionality, can save everyone time and effort when reviewing individual components in your solution. This will also make your code more readable as its intent will be clearly stated, and your solutions will rely less on inline-commenting or naming conventions to express their intent.

In summary, while it can be seen as a distraction or non-critical for a solution, documentation plays a key role in both the development and sustainability of your solution going forward. By empowering yourself and your team with a clear, and detailed, reference, you're incurring future savings of time and effort and ensuring that your solutions are more stable and of higher quality.

Summary

We have now reached the end of our first chapter! This was a lot of fun so far, and we hope it was the same for you. You should now have a solid understanding of not only what exactly automation and the theory of automation is, but also the general concepts associated with these. After acquiring this knowledge, you should now have a general idea of the opportunities and pitfalls of automation and best practices for implementing it. After that, we wanted to emphasize the high importance of documentation on automation and the associated best practices.

With these new skills and knowledge gains, we are ready to move forward to the next chapter, where we will begin our journey into exploring Salesforce Marketing Cloud and the automation tools available inside it.

Chapter 2: SFMC Automation Tools

Every good SaaS worth its salt has automation capabilities. They have moved from being a cool feature to being necessary for success. Any good system will offer a variety of options to help optimize or create efficiencies in workflows. Whether they are baked-in and user-friendly or more developer-based and require technical skills and knowledge, there are almost always some automation capabilities. This could be a ton of different things, such as the following:

A drag-and-drop scheduling toolA canvas-based pathing and logic toolServer scripting capabilitiesWidget functionalityAPI capabilities

Each one of these gives you the ability to interact with the platform outside of general UI capabilities, allowing for efficiencies and automation. This statement is pretty much true regardless of whether those platforms focus on data, messaging, or one of the million other services that can be offered.

For this book though, we will be concentrating on automation in relation to just one specific platform – Salesforce Marketing Cloud. We will explore many aspects of this platform, such as the following:

Salesforce Marketing Cloud: A brief history of the platform and details on what it is and what it doesMulti and cross-channel marketing: Look at what multi-channel and cross-channel marketing is and how they are differentAutomation tools in Marketing Cloud: A dive into the built-in tools inside of Marketing CloudJourney Builder overview: A broad overview of what Journey Builder is in regard to Salesforce Marketing CloudAutomation Studio overview: A broad overview of what Automation Studio is in regard to Salesforce Marketing CloudComparing Automation Studio and Journey Builder: A review and comparison between Journey Builder and Automation Studio

Learning about these tools and aspects will provide us with a strong base to build out our automations. The more we learn about where the platform came from, the history of the tools, and the details of how each tool works, functions, and interacts with others, as well as the platform itself, the more we can do in the future.

Let's not get too far ahead of ourselves yet though and instead of thinking about the future, let's dive a bit deeper into the past and learn about Salesforce Marketing Cloud and where it came from.

Salesforce Marketing Cloud

Salesforce Marketing Cloud (SFMC) is a Salesforce platform that concentrates on multi-channel messaging and 1:1 customer journeys. Marketing Cloud originated back in December of 2000, then called ExactTarget. This tool was originally focused solely on email marketing messaging only and started fairly small and simple. From its beginning as ExactTarget down to the current Salesforce-owned iteration, Marketing Cloud has gone through many forms and changed direction more than once.

The ExactTarget years

The platform slowly grew as time went on as it was a stable and versatile option with customer service that was above and beyond what was offered elsewhere. ExactTarget became a hit and continually grew and grew year by year. In late 2009, ExactTarget went international and established an office in London.

Through this powerful forward momentum, ExactTarget was able to purchase Pardot and iGoDigital among others in 2012 – increasing revenue and capabilities exponentially. These acquisitions gave ExactTarget more capabilities in multi-channel marketing and integrations. The platform shifted from just email to a more marketing hub-focused system, offering a lot of different capabilities and functionalities that placed them as a market leader.

This got ExactTarget a lot of attention and so the bigger companies started recognizing the potential. This is when Salesforce got involved and purchased ExactTarget in 2013. This was where the name Salesforce Marketing Cloud originated as the tool was rebranded and changed to fit within the Salesforce ecosystem. The official rebranding happened in 2014.

Salesforce acquisition

As Salesforce worked to integrate the tool within its structure and model, there were a lot of shifts away from the way things were in ExactTarget. Through these changes, users gained capabilities such as a new pseudo-CMS capability via Content Builder, new capabilities with data extensions, and integrations with other Salesforce Clouds and products!

This platform grew from just a single focused email marketing messaging tool into a world-class, top-of-the-market platform for building and managing personalized multi-channel journeys and messaging. This included implementing SMS/MMS capabilities, mobile push notifications, social media, digital advertising, and more.

These changes led Marketing Cloud further and further from being just an email marketing platform and instead turned it into a full-service marketing tool that could effectively ingest, implement, execute, and report on all aspects of digital marketing. This vision and innovation have led SFMC to become a leader in the market and one of the most popular marketing tools available. Now that we know a brief history of the tool, let's move on to a look into multi-channel and cross-channel marketing inside the platform.

Multi-channel and cross-channel marketing

Before digging into Marketing Cloud's foray into multi-channel and cross-channel marketing, our initial goal is to make sure we are all aware of what they are. Without knowledge of what multi-channel marketing or cross-channel marketing is, it doesn't really make as much sense or show the same level of impact, so we will give some quick insights into what they are.

Multi-channel marketing

Multi-channel marketing leverages multiple communication channels and mediums, utilizing channels such as the following:

Email marketingMobile SMS/MMS and pushDirect mailSocial media

Leveraging multiple channels allows you to unify the numerous interactions your customer has with the marketing messaging they are receiving. Almost all messaging services are now multi-channel marketing, but even just a couple of years ago, this was a very strong selling point and something that only a few platforms had the capability to do (and do well). The following diagram gives a good visual representation of what we are talking about with regard to multi-channel marketing.

Figure 2.1 – Visualization of multi-channel marketing

Now that we have a good visualization, let's take a deeper dive into why you would want to use multi-channel marketing.

Why use multi-channel marketing?

Now that we know what multi-channel marketing is, the question we need to ask is why is it important? What sort of value could you receive for all the added effort and organization required to utilize multiple different channels for your marketing campaigns?