Skip to main content

Return to TX Community

Liaison

Setting the Student Stage to Inquiry when a person registers for an Event

The following steps outline how to build a Flow on the Contact Schedule Item object that sets the Student Stage based on the Confirmed record, where the Student Stage is Null. 

Before you Begin

  • Perform these steps in a sandbox environment before implementing them in your production instance.
  • If you have Prevent Student Stage Rollback enabled in your Org and you want to create this flow, you will need to add additional logic using Decision elements to account for this. For information on Decision elements, see the Salesforce Help & Training article Flow Element: Decision.

Step 1: Create a New Flow

  1. Go to Setup in Salesforce.
  2. In the Quick Find field, search for and select Flows.
  3. Click New Flow
  4. Choose Start from Scratch
  5. Choose Record-Triggered Flow and click Create.

Step 2: Configure the Trigger

  1. Object: Select Contact Schedule Item.
  2. Trigger the trigger when: A record is created or updated.

Set Entry Conditions

  1. Condition Requirements: All Conditions are met (AND)
    • Field = TargetX_Eventsb__Confirmed__c
    • Operator = Equals
    • Value = True
  2. When to Run the Flow for Updated Records = Only when a record is updated to meet the condition requirements.
  3. Optimize the Flow for: Choose Actions and Related Records.
  4. Click Save.

TargetX_Flow_ConfigureStart.png

Step 3: Create a Variable

You’ll need to create a Variable on the Contact/Student object to define the data to be updated.

  1. Click New Resource.
  2. Choose Variable.
  3. Enter an API Name, such as “varcontact” and a Description.
  4. Set the following:
    1. Data Type = Record
    2. Object = Contact/Student
  5. Click Done.

Step 4: Add an Assignment Element

The Assignment element will reference the variable you created and will specify the records and fields to be updated.

Define Assignment

  1. Enter a Label, such as ‘Values to update for Contact.Student Stage’, the API Name will default.
  2. Enter a Description.

Set Variable Values

  1. Add the following two variable Values, replacing varContact with the name of the Variable you created.
    1. {!varContact.TargetX_SRMb__Status__c} equals Inquiry
    2. {!varContact.Id} Equals {!$Record.TargetX_Eventsb__Contact__r.Id}

TargetX_Flow_Assignment.png

Step 5: Add an Update Records Element

  1. Click the + icon after the Start element and select Update Records.

Update Records

  1. Add a Label, such as a Naming it something like "Update Contact Student Stage", the API Name will default.
  2. Enter a Description.
  3. Set the following:
    1. How to Find Records to Update and Set Their Values = Use the IDs and all field values from a record or record collection.

Select Records to Update

  1. In the Record or Record Collection field, choose the Variable you created.
  2. Click Save.

TargetX_Flow_UpdateRecords.png

Step 6: Save and Activate the Flow

  1. Click Save.
  2. Give your Flow a name, such as "Update Contact Student Stage on ContactScheduleItem Update".
  3. Click Activate.

Step 7: Test the Flow

  1. Update a ContactScheduleItem record to ensure the Flow triggers and updates the Student Stage field on the related Contact.
  2. This Flow setup will ensure that whenever a ContactScheduleItem record is updated with Confirmed = True , the related Contact's Student Stag e field is also updated according to the logic you've defined.

TargetX_Flow_OverviewImage.png

 

 

  • Was this article helpful?