Example use case
You've connected Salesforce to your Calendly account. You want to sync event data for your Sales team to Salesforce, but you don't want to sync event data for users outside of Sales. In this case, you can modify your Salesforce flow to only run for certain event types or users.
Editing the flow vs. the process
Your setup will differ slightly depending on your package version. For version 2, you'll edit the flow directly. For version 1.11, you'll use the Process Builder. Your Salesforce Integration page will tell you what package you're using.
How to adjust the flow to run for certain events or users
- In Salesforce Setup, search for Flows. Select Flows.
- If you haven't customized the CreateEventTemplate before, you'll need to create a new flow based on the template. To do so, you can open the CreateEventTemplate, customize it directly, then Save as. Saving it will create a new flow. You can call the new flow something like "CreateEvent."
- If you've already customized the CreateEventTemplate flow, then open your customized flow.
- In the beginning part of the flow, locate Object: CalendlyAction, and select Edit.
- Under Condition Requirements, select the conditional logic you'd like the flow to follow (All Conditions are Met (ALL), Any Condition is Met (OR), or Custom Condition Logic is Met).
- Under Field, select Calendly__EventTypeName__c or Calendly__EventPrimaryPublisherEmail__c, depending on if you want to filter the flow by Calendly event type or by user.
- Under Field value, enter the event type name exactly as it appears in Calendly, or the Calendly user's email, depending on what field you selected in the previous step.
- Select Done.
- To save your customized flow, select Save.
- To activate your customized flow, select Activate. Note: you will also need to deactivate the CreateEventTemplate, so you don’t have duplicate events in Salesforce.
How to adjust the Process to run for certain events
You can modify the OnCalendlyActionCreated Process in the Process Builder to trigger your flow based on certain criteria, such as Event Type Name or Event Primary Publisher Name (Calendly user).
With the steps below, you can set the flow to only run if a Calendly event type has a specific name. To do so, you will need to filter by Event Type Name.
- In Salesforce, search for Process. Select Process Builder from the dropdown.
- Select the OnCalendlyActionCreated process.
- See the page refresh, then select Invitee.Created. Note: You may have to clone the process if it's already active and modify the duplicate process.
- At Define Criteria for this Action Group, and under Set Conditions, select +Add Row, then select the empty Field box to input a field.
- At Select a Field and next to CalendlyAction__c, enter Event Type Name, then select Choose.
- For Value of the newly added row, enter the event type name for which you want to trigger the flow, then select Save.
- To activate the new process, select Activate, then Confirm. This will deactivate any other versions of the process.
How to adjust the Process to run for certain users
You can trigger the flow to only run for certain users if you modify the Process to add [CalendlyAction__c].EventPrimaryPublisherEmail__c (the primary publisher in Calendly’s email) choose Equals, and add the Calendly user's email addresses.
Conversely, you can choose Does not equal, which will exclude a person from running the Process when they are booked.