Tuesday, December 3, 2024

Salesforce flows with examples

 It seems like you're asking about flows with examples, but could you clarify what kind of flows you're referring to? For example:

  1. Process Flows: Steps in a business process, like onboarding an employee.
  2. Data Flows: Movement of data through a system, like ETL (Extract, Transform, Load) processes.
  3. User Flows: The journey a user takes through a website or app, like signing up or making a purchase.
  4. Programming Flows: Logical sequences in code, such as loops, conditions, or state machines.
  5. Workflow Automations: Tools like Zapier, Power Automate, or others used to automate tasks.

Salesforce Flows are powerful tools for automating business processes within Salesforce. They allow admins to configure actions, collect data, and interact with the system without needing extensive coding knowledge.

Here are examples of Salesforce Flow types with real-world scenarios:


1. Record-Triggered Flow

Scenario: Automatically update a related record when an Opportunity is closed.

  • Use Case: Update the Account’s "Last Closed Date" field when an Opportunity is marked as "Closed Won."
  • Flow Steps:
    1. Trigger: When a record is created or updated on the Opportunity object.
    2. Conditions: Opportunity Stage = "Closed Won."
    3. Action: Update the related Account record with the Opportunity’s Close Date.

2. Screen Flow

Scenario: Guide customer service reps through a case escalation process.

  • Use Case: Prompt users to input additional information for a high-priority case.
  • Flow Steps:
    1. Start: Create a button on the Case page to launch the flow.
    2. Screen: Ask for details like the escalation reason and expected resolution date.
    3. Action: Update the Case record with input values and notify the Manager via email.

3. Scheduled-Triggered Flow

Scenario: Send a reminder email for overdue tasks.

  • Use Case: Notify users of open Tasks that are due today or earlier.
  • Flow Steps:
    1. Trigger: Run daily at 8:00 AM.
    2. Get Records: Query open Tasks with a due date before today.
    3. Action: Send an email notification to the assigned user with Task details.

4. Autolaunched Flow (Invocable)

Scenario: Integrate with external systems to validate customer data.

  • Use Case: Validate an email address by sending it to an external API.
  • Flow Steps:
    1. Input Variables: Accept an email address.
    2. Action: Use an HTTP callout to an external API for validation.
    3. Output Variables: Return the validation status (valid or invalid).
    4. Usage: Invoke the flow from Apex or another flow.

5. Loop in Flow

Scenario: Assign open leads equally among users in a sales team.

  • Use Case: Distribute leads using a round-robin method.
  • Flow Steps:
    1. Trigger: A record is created or updated on the Lead object.
    2. Get Records: Retrieve all open Leads.
    3. Loop: Iterate through the list of leads.
    4. Assignment: Assign each Lead to the next available sales user in the round-robin list.
    5. Update Records: Save the updated owner for each Lead.

6. Subflow

Scenario: Use a common subflow for contact verification across multiple flows.

  • Use Case: Validate Contact fields (email and phone) and handle errors.
  • Flow Steps:
    1. Create a reusable subflow to check for valid email and phone numbers.
    2. Integrate the subflow into other flows, like creating a new Lead or updating Account information.

7. Decision Element in Flow

Scenario: Route cases to the appropriate team based on priority and type.

  • Use Case: Automatically assign cases to different teams.
  • Flow Steps:
    1. Trigger: A record is created on the Case object.
    2. Decision: Evaluate conditions:
      • High Priority & Technical Issue → Assign to Tech Support.
      • High Priority & Billing Issue → Assign to Finance.
      • Else → Assign to General Support.
    3. Action: Update the case owner field with the corresponding team queue.

8. Email Alert in Flow

Scenario: Notify the sales team when a large Opportunity is created.

  • Use Case: Send an email to the sales manager if an Opportunity's Amount exceeds $100,000.
  • Flow Steps:
    1. Trigger: A record is created or updated on the Opportunity object.
    2. Condition: Amount > 100,000.
    3. Action: Use the "Send Email" action to notify the manager.

9. Platform Event in Flow

Scenario: Trigger notifications to external systems for large orders.

  • Use Case: Notify an inventory management system about large sales orders.
  • Flow Steps:
    1. Trigger: A record is created on the Order object.
    2. Condition: Order Total > 50,000.
    3. Action: Publish a Platform Event with the order details.

No comments:

Post a Comment