Automating Business Processes with Salesforce Flow Triggers

Sathya Bandara
3 min readFeb 20, 2024

--

Photo by Hal Gatewood on Unsplash

In the fast-paced world of business, effective and streamlined processes are the key to success. Salesforce, a powerful customer relationship management (CRM) platform, plays a pivotal role in helping businesses manage and organize their data.

Integrating with Salesforce is essential for businesses aiming to enhance customer relationships, improve efficiency, and gain valuable insights. Salesforce serves as a centralized hub for customer data, enabling organizations to make data-driven decisions, boost sales, and provide exceptional customer experiences.

One crucial aspect of maximizing the potential of Salesforce is automating business processes, and Salesforce Flow is one such robust solution for achieving this goal.

Salesforce Flows offer a declarative and user-friendly way to automate processes. Autolaunch Flows, in particular, can be triggered without user interaction, making them ideal for background processes. Autolaunch Flows can be invoked synchronously providing flexibility in implementation.

Use Case: Daily Reset of Closed Support Tickets Count

Scenario

Imagine a company providing customer support services where support agents resolve customer issues by closing support tickets. The business wants to track and analyze the daily performance of each support agent based on the number of tickets they close. To achieve this, a Salesforce custom field named “Closed Tickets Count” is used to store the total number of closed tickets for each agent.

Requirement

The business has a requirement to reset the “Closed Tickets Count” field to zero at the beginning of each day, ensuring that the daily count reflects the tickets closed on that specific day.

Implementation

To implement this use case, the company can utilize Salesforce Autolaunch Triggers along with Flows. The Autolaunch Flow would be designed to run daily and reset the “Closed Tickets Count” field for all support agents to zero.

Example Field

  • Field Name: Closed Tickets Count (custom field on the User object)
  • Field Type: Number

Process

The Autolaunch Flow is designed to query and update records based on specified criteria. In this case, it retrieves all user records (support agents) and sets the “Closed Tickets Count” field to zero.

Creating an Autolaunch Flow via Flow Builder

Execution

To ensure that the “Closed Tickets Count” field is reset at the beginning of each day, there are two options.

  1. Schedule the trigger to run daily at a specific time
  2. Invoke the trigger via the Salesforce REST API which facilitates you to streamline it with your existing business processes.
curl --location '{salesforce_url}/actions/custom/flow/{flow_api_name}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"inputs": [{}]
}'

Result

At the end of each day, the “Closed Tickets Count” field for each support agent is automatically reset to zero, providing a clean slate for tracking the daily performance of support agents in resolving customer issues.

This example demonstrates how a business statistic, in this case, the count of closed support tickets, can be effectively reset daily to provide accurate and up-to-date insights into the daily performance of support agents.

--

--

Sathya Bandara
Sathya Bandara

Written by Sathya Bandara

A Software Engineer on a Quest for Knowledge, Eager to Learn, Share, and Lift Others Along the Way

No responses yet