Flows

In Salesforce, a flow is a tool that automates complex business processes. Simply put, it collects data and then does something with that data.

Fill Salesforce Object Lookup in Clazar Custom Object

This flow template is designed to automatically fill the lookup field in a custom object.

  • Users can leverage this template to streamline the process of populating lookup fields related to Opportunity, Quote, or CPQ Quote objects.
  • By cloning and modifying this template, users can adapt it to fit their specific lookup fields.

This document provides a detailed guide on configuring and utilizing the flow template.


Flow Structure

The flow consists of three main elements:

  1. Start Element: Configures the flow to trigger when a record in the “Clazar Offer” object is created or updated.
  2. Get Records Element: Retrieves the corresponding Salesforce object (Opportunity, Quote, or CPQ Quote) based on the ID provided.
  3. Update Records Element: Updates the lookup field in the “Clazar Offer” object with the retrieved Salesforce object.

Configuring the Flow

  1. Start Element Configuration:
    • Object: Clazar Offer
    • Trigger the Flow When: A record is created or updated
    • Condition Requirements: All Conditions Are Met (AND)
      • Field: clazar__mapped_object_id__c
      • Operator: Is Changed
        • Value: True
      • Field: clazar__mapped_object_type__c
        • Operator: Equals
          • Value: Opportunity
      • This configuration ensures that the flow is triggered only when the mapped object ID field is changed and the mapped object type is Opportunity.
  2. Get Records Element Configuration:
    • Label: Get Salesforce Mapped Object
    • API Name: Get_Salesforce_Mapped_Object
    • Object: Opportunity (or Quote, CPQ Quote as needed)
    • Condition Requirements: All Conditions Are Met (AND)
      • Field: Id
      • Operator: Equals
      • Value: $Record > Mapped Object Id
    • This configuration retrieves the record from the specified object based on the mapped object ID provided.
  3. Update Records Element Configuration:
    • Label: Update Lookup Field
    • API Name: Update_Lookup_Field
    • How to Find Records to Update and Set Their Values: Use the Clazar Offer record that triggered the flow
    • Set Field Values for the Clazar Offer Record:
      • Field: clazar__Opportunity__c (or the respective lookup field)
      • Value: Opportunity from Get_Salesforce_Mapped_Object
    • This configuration updates the lookup field in the Clazar Offer record with the corresponding Salesforce object.

Usage

  1. Cloning the Template:
    • Users can clone this flow template to create multiple versions tailored to different lookup fields (e.g., Opportunity, Quote, CPQ Quote).
    • Navigate to the Flow Builder and select “Clone” to duplicate the template.
  2. Modifying the Template:
    • Modify the “Get Records” element to change the object from which records are retrieved (Opportunity, Quote, CPQ Quote).
    • Update the “Update Records” element to match the specific lookup field in the custom object.
  3. Activating the Flow:
    • Once the flow is configured, activate it to enable automatic population of the lookup fields.
    • Ensure that the flow is tested in a sandbox environment before deploying it to production to verify its functionality.

Benefits

  • Efficiency: Automates the process of populating lookup fields, reducing manual data entry and errors.
  • Flexibility: Easily adaptable to various lookup fields by cloning and modifying the template.
  • Scalability: Can be extended to include additional conditions and actions as needed.

How This Flow Can Be Helpful

  • If users want to create a report based on the Clazar custom object “Offer”, this flow template can be extremely useful.
  • By automatically filling in the lookup field, users can easily generate reports that incorporate related data from Opportunity, Quote, or CPQ Quote objects.

Currently, Clazar does not add the lookup field due to some limitations. However, with this flow, users can overcome this limitation and ensure their reports are comprehensive and data-rich.