Configure a Record-Triggered Flow for Visits

Create a fast record-triggered flow to assign the default visit template and place ID before the visit creation. This approach assumes that you can stamp default values to the Record Id and Visit Template. You can change the custom settings and update this flow accordingly.

  1. From Setup, go to Flows, and then click New Flow.
  2. Select Start From Scratch, and click Next.
  3. Select Record-Triggered Flow, and then click Create.
  4. Configure the Start page.
    1. Select Visit as the object.
    2. In Trigger the Flow When, select A record is created.
    3. In Set Entry Conditions, select None.
    4. Optimize the flow for Fast Field Updates.
  5. Add an element after the Start element.
    1. Click the + icon, and select Update Records.
    2. Add a label and API name for the element.
    3. In Set Filter Conditions, select Custom Condition Logic is Met.
      Condition Entry
      Condition logic 1 OR (2 AND 3)
      First condition WA_AdvRouteWaypoint__c IS NULL False
      Second condition PlaceId IS NULL True
      Third condition cgcloud__Visit_Template__c IS NULL True
    4. Set field values.
      Field Entry
      PlaceId $Setup.VisitMapsDefaults__c.DefaultPlaceId__c
      RecordTypeId $Setup.VisitMapsDefaults__c.DefaultRecordTypeId__c
      cgcloud__Subject__c $Record > Account Id >> Account Name
      cgcloud__Visit_Template__c $Setup.VisitMapsDefaults__c.DefaultVisitTemplateId__c
    5. Enter a flow label and flow API name and then save your changes.
    6. Activate the flow.