By default, Calendly’s Salesforce flow creates an event when someone schedules a meeting. But you can change this to also create a task or a case.
Follow these steps to customize your flow in Salesforce.
Create a task or case in Salesforce
Step 1: Open your flow
-
In Salesforce Setup, search for Flows.
-
Select Flows from the results.
-
If you haven’t edited the CreateEventTemplate before:
-
Open the CreateEventTemplate.
-
Customize it as needed.
-
Select Save As, and give it a name like CreateEvent.
-
-
If you’ve already made changes to the template, open your existing flow.
Step 2: Add a task or case element
-
In the Toolbox on the left, go to Data.
-
Drag a Create Records element into the flow. Drop it to the right of the Create Records: Create Event element.
-
At Label, type Create Task or Create Case.
-
For How to Set the Record Fields, select Use separate resources and literal values.
-
At Create a Record of This Object, under Object, enter Task or Case.
-
At Set Field Values for the Task, set the field values:
- At Field, enter Subject
- At Value, select Calendly__CalendlyAction__c, then select Event Subject.
- Select + Add Field
- At Value, select WhatID, then select the value WhatRecordID
- Select + Add Field
- At Value, select WhoID, then select the value WhoRecordID
-
Check the box for Manually assign variables.
-
For Store Task ID in Variable, choose WhoRecordId.
-
Select Done.
Step 3: Connect the steps
-
Connect the Create Records: Create Event element to the new Create Task (or Create Case) element.
Step 4: Save and activate the flow
-
Select Save.
-
Select Save As to create your new version.
-
Select Activate to turn on the new flow.
-
Deactivate the CreateEventTemplate flow so it doesn’t run at the same time.
-
In Setup, search for and select Flows.
-
Under Flows, find the CreateEvent flow and select Open.
-
In the Toolbox, go to Data.
-
Drag a Create Records element into the flow and drop it next to the Create Event element.
-
At Label, type Create Task or Create Case.
-
For How to Set the Record Fields, select Use separate variables, resources, and literal values.
-
At Create a Record of This Object under Object, enter Task or Case.
-
Set the fields:
-
Field: Subject
-
Value: {!NewCalendlyAction.EventSubject__c}
-
Variable: {!WhoRecordId}
-
-
Select Done.
-
Connect the Create Event element to the new Create Task (or Create Case) element.
-
Select Save, then Save As.
-
Select Activate to turn it on.