top of page

Custom Flows & Macros

Flows Logo

Among the many custom automations I helped configure as a Technical Support Engineer and as a Trainer, I designed and implemented various Macros and Flows for Sales & Service Cloud to automate record assignment and notifications (to both internal and external users when needed). A few examples for Flows:


  • Lead Qualification Screen Flow, to help Sales reps contact relevant Leads based on info provided.

  • Rating Leads based on Annual Revenue using a formula RT Flow.

  • Rating Opportunities based on their Amount using a Formula RT Flow.

  • Calculate discount for Opportunities based on related Account's Annual Revenue.

  • Create Quote & Quote Line Item from an Opportunity RT Flow.

  • Create Follow Up Task on New and Not Contacted Leads RT Flow.

  • Deactivate Users from a Screen Flow with a picklist.

  • Inactive Accounts Flow RT Flow, to mark all Opportunities related to an Inactive Account as Closed Lost.

  • Fault Path Triggered Flow: a reusable Sub-flow applicable to all After-Save Record Triggered Flows for error handling. Sends a message via Chatter or Email to notify both Flow's running user and System Admin.

  • Fault Path Screen Flow: a reusable Sub.flow that can be deployed in Screen Flows' Fault paths. Shows a message when user incur in an error, and sends the fault message's details to the Salesforce Administrator.

  • Create Child Campaign record with a Flow launched through a custom button.

  • Lead Source field update to "Web" Scheduled Flow, updating those records where the Lead Source is blank.

  • Contact Missing Email address RT Flow, posts a chatter message for records' owners when the email field is left blank upon Contact's creation.

  • Chatter OOO Screen Flow, after enabling Chatter's "Users can set OOO messages" option in Setup, this Flow can be added to an App Utility Bar and allow users to set a Start & End Date and OOO message.

  • Opportunities Mass Transfer Screen Flow, allows to transfer record ownership through a picklist to select a user and a table to select the opportunities.

  • Scheduled Flow to screen daily Contact records for missing relevant data (related Account's ID, First Name, Email, and Phone).

  • Weekly Check for Contacts Scheduled Flow, runs weekly alerting Mangers of Accounts with no related Contacts.

  • Collection Sort Screen Flow, to filter retrieved Contact records related to an Account.

  • Collection Filter Screen Flow, to filter out Contact records marked for deletion.

  • Update Address on Account's related Contacts Screen Flow, assigning an Account's address to related Contacts.

  • Set Case Priority RT Flow, automatically sets the right Priority when support cases are created.

  • Case Priority RT Flow, notifying records' Owner when a Case Priority is updated to "High".

  • Daily High Priority Cases Scheduled Flow, uses the custom object Archived Metric's Value field to store each start of the day’s high-priority cases count still open from the previous day.

  • Check New Leads for Matching Account RT Flow, to see if there’s already an Account whose Name matches the Lead’s Company field. If there’s a match, it adds that account to the lead’s Possible Matching Account Custom field.

  • Refund Stage change based on Refund Reason RT Flow, sends customers emails rejecting (for missing info) or accepting their refund requests, updating the Stage field accordingly and notifying the record's Owner via Chatter.

  • Onboarding Project Initiation Screen Flow, guides users with the Onboarding Lead Permission through their onboarding projects.

  • Draft Contract for Closed Won high-value Opportunities RT Flow. In addition, 5 days after the opportunity closes it creates a task reminding the Opportunity Owner to follow up with the Account owner.

  • Review Opportunity with Account Owner RT Flow, creates an email follow up task for the Owner when high-value Opps are ready for Negotiation and Review, 3 days after the last update creates another task suggesting a call.

  • Framework Contract KPIs update tracking RT Flow. Tracks targets / KPIs by summing up information from Won and Open Opportunities related to the Framework Contracts custom object. Discerns info by Sum of Actual Won & Open Opportunities, and Count of Actual Won & Open Opportunities.

  • Quote Discounts RT Flow. When a user enters a value in the Hardware Discount custom field on a Quote, this Flow automatically creates a corresponding Discount Line Item using the custom Product "Hardware Discount". It also calculates the Hardware Total sum value on the Quote, showing the sum of all the Products with Product Family of “Hardware”, reduced by the Hardware Discount value.

  • Order Split by Product Family Screen Flow. This is activated by users through a custom button on an Order record, allowing them to split existing orders into multiple new Orders on demand. These New Orders are then distributed separately according to their unique Product Family found in the original Order Items.

  • Order Split through an Apex Controller and LWC Data Table. In this case there is no separation by Product Family but users can flexibly split the original Order and distribute Order Products to new Orders selecting them in a custom Table component.

  • Opportunity Overview with Stage Filter Screen Flow. It filters and display all Opportunities currently in the Org by Stage, using a picklist and data table component.

  • Custom Duplicate Display Component on Accounts, Contacts, and Leads Object through Apex Controllers and LWC Data Tables. Based on these objects' standard Duplicate & Matching Rules, these custom components allow users to identify potential duplicate records and take action.

  • Lead Repeater & Google Address Search Screen Flow. Using a Repeater component, it allows to create multiple Leads at once, while using Google search function to verify their Address accuracy.

  • Lead Duplicates Screen Flow prevents Lead records duplicate creation, checking their Email, First & Last Name info. Lead Duplicate & Matching Rules need to be disabled.

  • Lead Test Data Screen Flow allows users to generate up to 50 dummy Lead records for testing. Using First Name, Last Name, Company Name, Phone values and Number of Records combined with a Loop Counter Variable, this Flow generate records with different values.

  • Account lookup to related Contacts & Opps Data Table Reactive Screen Flow allows users to select an Account record from a Lookup and retrieve related Contact & Opportunity record(s), displaying the results in 2 Data Tables. Uses "Get Contacts" & "Get Opportunities" Autolaunched Flows to retrieve Contact & Opportunity records. 

  • Multiple Files Uploader Screen Flow allows users to upload multiple Files at once to an Account record's Notes & Attachment (or Files) Related List using a Screen component.

  • Lead Progress Indicators in Screen Flow helps users see progresses while providing info on a (website or Salesforce) form, in order to complete a Screen Flow and create a new Lead record. Uses Salesforce Labs' "Dynamic Flow Progress" component.

  • Account Record Types' IDs Screen Flow: can be used to retrieve an Object's Record Types' IDs, and display them in a Screen component.

  • Account Entry Criteria updates an Account record's Description field with a short summary when the Account has a specific Record Type and an Annual Revenue above 50K. Used to show how to set a tight entry criteria for a Record Triggered Flow.

  • Opportunity Decrease Warning RT Flow uses a $Record_Prior Global Value Variable to trigger an email to be sent to an Opportunity Owner's Manager when the Opportunity's Amount is decreased by more than 30%.

  • Sending Emails Schedule Triggered Flow demonstrating 4 types of emails: Plain text Email, HTML Emails, Classic Template Emails, Email with Tables. The Flow is set to run daily, and the Decision Element within it will decide which branches execute depending on which day it is. Some part of the Flow will run on Monday, Tuesday, Wednesday and Thursday. On the remaining days it will start, go to the 1st Decision element and then end. Flow runs once per record that meets the Start criteria: once per Active User Account.

  • Submit Opportunity for Approval RT Flow runs when an Opportunity record's Stage is changed to progress beyond the "Proposal/Price Quote" Stage. The change triggers a custom Opportunity Approval Process to evaluate the request, using 3 Classic Email Templates to send email updates to both Manager (Opp Awaiting Approval) and Opportunity Owner (Opp Approved, Opp Rejected). Successful approvals will be reflected in a custom "Approved" checkbox field.

  • Retrieve Account's related Contacts by Annual Revenue demonstrates IN or NOT syntax by generating a Screen Data Table element of Accounts where their annual revenue is equal or greater than a specific input value. It then displays their related Contacts in a second Screen Data Table element.

  • Is Account Object Empty? Inside a Decision element following a Get Records, allows to test a Collection of records to see if it contains any Account records or not, by using the "Is Empty" Operator and showing results in a Data Table (if records are found), or a Screen with an Error message if there are no records. This saves additional steps to add a separate Counter variable and an Assignment step.

  • Create Contact and redirect to it with custom Record link this Screen Flow uses a custom Record Link Formula to redirect users to a new Contact record they just created. Workaround used to avoid hardcoding records' URLs in Flows, because records' links changes between Test and Production Orgs.

  • Deactivate Account with Open Opps Error Message using the Custom Error Message element, this Record-triggered Flow displays a message when an error occurs (in this case, when trying to deactivate an Account with related Open Opportunities records), sharing on screen details on what went wrong and how to solve the issue.

  • Account Collection Filter & Sort by Annual Revenue using 4 different Screen elements, it retrieves and displays unsorted Account records, then sorts and displays them by Name, then filters out Inactive Accounts and displays the active ones, and finally sorts them by displaying only the Top 5 by Annual Revenue.

  • Update Running User's Opportunity records Close Date displays the Running User's Open Opps in a Data Table Screen element, allowing multiple records to be selected. In a second Screen, it prompts the user to provide a new Close Date to be applied to all selected Opps. Uses a Transform element to cycle through record collection, replacing Loop and Assign elements, and allowing faster Opps' records update.

  • Send scheduled email updates when Opportunity Stage is changed to Need Analysis

    This Record Trigger Flow fires when the Opp's Stage is changed to Need Analysis creating:

    • An immediate action Task for the Opp's Owner to call the Customer

    • A Scheduled Path to send an email remainder to Opp's Owner in 3 days

    • A Scheduled Path to send an email remainder to Opp's Owner and their

      Manager in 7 days

    • Fault Path to all DML operations and email actions

  • Opportunity Posts to Chatter through a Screen components allows to type messages to:

    • Mention the Opportunity's Owner in a Chatter post (Plain Text)

    • Post a Chatter message on an Opportunity's record (Create Records), mentioning its Owner and their Manager (Plain Text)

    • Post a Chatter message in a dedicated "Priority Opportunities" Chatter Group, mentioning the Opportunity's Owner and their Manager (Rich Text)

  • Custom Push Notification when Opp Closed Won sends a Custom Push Notification inside Salesforce (Desktop & Mobile) to an Opportunity's Owner when an Opportunity record is updated to the Closed Won Stage, mentioning next steps to follow. It prevents users from switching to an external Email provider to check their Salesforce's updates, saving them time.

  • Lead / Contact Quick Create Global Action this Lightning Component and its Controller allows to quickly create a new Lead or Contact record from a Global Action, through a pop-up modal window component located in the bottom right-hand corner of the screen. The same can also be added and run from Apps' Utility Bar.

  • Login Flow is a Screen Flow to prompt users to accept a Company's Terms & Conditions before logging into Salesforce. Comes with a custom checkbox field to indicate the user has already accepted the T&C. When checked, they won't have to go through the Flow again. Don't apply this to a System Admin to avoid being locked out by mistake.

  • Leads - Import & Creation from CSV File using a Screen component, allows users to import CSV files containing new Lead records, instead of having to manually type the new records in Salesforce. It accepts an input file and then use the file as input to create new Lead records. It demonstrates the use of UnofficialSF's:

    • File Upload Improved allowing to upload files even when they are not attached to records (overcoming this standard File Upload component limitation).

    • Convert CSV to records by taking one or more Content Document IDs as input, it allows to upload CSV data and turn them into Salesforce records by using the "Convert CSV to Records" invocable Action.

  • Bulk Delete Leads by selecting displaying Lead records in a Screen Data Table component, offers a way to dispose of duplicate Leads to Salesforce Users responsible for managing new Leads, so these won't get assigned to the Sales Team.

  • Bulk Delete Opportunities by selecting displaying Opportunity records in a Screen Data Table component, offers a way to dispose of Open Opportunities that won't proceed further or where created by mistake.

  • Custom Contact Form Flow Toolkit through a Screen Component allows Sales Users to input new Contact records with pictures, signatures, and multi-select values. Uses the Flow Tool Kit 3rd party custom component to configure the featured custom Form.

  • Clone Opportunities with Products through a custom "Clone with Products" Action Button, offers Sales Users the possibility to clone an Opportunity with or without its Products, and selecting the Stage in order to create recurring Opportunities faster.

  • Freeze & Unfreeze Users this Screen Flow displays a list of active User records allowing System Administrators to easily freeze and unfreeze multiple user records at once.

  • Set Contacts' Email to ".invalid" allows System Admins to change all Contacts' email's suffix to .invalid. This will prevent accidentally triggered bulk emails from being delivered.

  • Contact HTTP Request Callout displays a Screen component on Contact records showing the current Date and Time in their Local Time Zone. This way, if Sales Reps want to call or email them, they know their Local Time and can select the appropriate time slot. Uses IP Geolocation API External Credential Provider to convert an Address into a Local Time Format.


Macros:

  • Add sample/standard text to Description field

  • Change the Case status to Closed

  • Create a Task for all matching Accounts

  • Escalate Case, changes Priority to High for New Cases

  • Request more info, send email and changes Case Status to On Hold

  • Select multiple Cases from List View, Change Owner and Change Status to Working

  • Select Log a Call Action, create a follow-up task to call again Customer in a week time

  • Send an Email asking for info and update Caste Status to Working when the Case is New

  • Send Bulk Emails to Contacts with known-issue explanation

  • Send Case Closed Email to related Contact

  • Send Email Request for pictures of current issue

  • Stopped Milestone notification, sends an email requesting updates to Customer

  • Thank you message when Case Status is changed to Closed


Resources:

bottom of page