Declarative Programming in Salesforce – The Power of “Clicks Not Code”

How can you program without knowing a programming language? with Salesforce’s “Clicks Not Code” in their Lightning Flow Builder tool, that’s how.

It’s 1998, you’re at your cubicle and your co-worker says he has been assigned the task of designing an automated system that scans live data and acts upon it intelligently. He tells you he is going to do it all without writing one line of code. You would call him crazy and ask for his resignation. Jump ahead 10 years to 2008 and you would likely approach it the same way.

But in today’s age of technology, the idea of declarative means of programming are not so farfetched. An administrator can now handle these types of requests on their own, without any advanced development experience.

Salesforce consulting partner
Smartbridge is a Salesforce Consulting Partner and Managed Services Provider

With tools like RPA & AI quickly advancing, these types of approaches are becoming more common, however Salesforce has been a bastion at the forefront of what they call “Declarative Programming” for quite some time.

Their tag “Clicks Not Code” was something I tested to its full extent recently, and it proved to be a successful, reliable approach to development.

While the clicks not code method is a great method available for those less inclined to programming languages, that doesn’t mean you don’t have to be prepared to implement development-like methodologies.

In 2018 Salesforce released the Lightning Flow Builder tool, which is an updated version of their previous Flow tool. It has been overhauled to make it easier than ever to create process-oriented logic that can execute based on actions and events. It’s powerful enough to achieve a lot of the same things that a developer would achieve writing apex triggers. This is all done without writing any code, and adding everything with a point or click using pre-built functions in the Flow designer that are drag and drop.

Understand the Impact

Before taking any action, assessing the task at a high level should be the first step. You’ve been given a design and have been asked to build it, before putting on your gloves and hard hat, it’s better to decide what tools you need to bring with you to the worksite first.

  • What parts of the data model will this impact?

  • Do I understand the process end to end? Are there any gaps or risks?

  • Are there any areas of complexity that will need to be scrutinized?

  • What is the most efficient way to achieve this? How can it run with the least amount of impact to the system?

These are typically questions you would ask in any Salesforce configuration or implementation, however there are additional questions that a developer needs to think about when writing custom code. While you are not writing code yourself, you need to approach the tasks as a developer would.

  • What are the system limits we need to abide by?

  • What is the order of execution?

  • What size of data will I be working with?

  • Will there be an impact to other processes?

declarative programming flow diagram

Build a Development Path

Even with clicks and no code, mastering Flow demands a developer-like mindset. It is important to consider the following points when building a development path.

BEFORE YOU BUILD

  • Understand the impact: Analyze data model changes, process flow, potential roadblocks, and optimal efficiency.

  • Think like a developer: Consider system limitations, execution order, data volume impact, and potential effects on other processes.

DEVELOP WITH CLARITY

  • Comment your Flow: Add detailed explanations to each element.

  • Organize visually: Arrange elements logically, mirroring the execution flow.

  • Name consistently: Use standard variable names for easy understanding.

By adopting these practices, you’ll create maintainable, understandable Flow automations that empower both you and your team. Remember, Flow is more than just clicks. It’s a powerful tool when you engage the developer within.

Stay Organized

Staying organized is imperative. Just as a developer would comment out notes and details to explain what things do, be sure to add descriptions to your Flow elements. When you have 100 or more items in your Flow, it may be hard to keep up with everything or come back to something 3 weeks later and remember what it was used for.

It’s also important to keep everything nice and tidy visually. As a developer would nicely format his code by using proper indentation, a Flow needs to be laid out in a way that makes sense and is close to the order of operation it is running in. One of the great benefits of Flow is that it is easily digestible visually when properly formatted.

Pros & Cons

While Flow’s and other “Clicks Not Code” methods can cover a lot of ground that developers would normally cover in Salesforce, there are some limitations. But there are also some benefits. Each scenario should be evaluated to determine the best approach. If you’re confused as to when to use Declarative vs. Conventional Programming in Salesforce, reach out and we’ll assist you!

Looking for more on Salesforce?

Explore more insights and expertise at smartbridge.com/salesforce

There’s more to explore at Smartbridge.com!

Sign up to be notified when we publish articles, news, videos and more!