Overview
When a new invitee schedules, the Salesforce flow will create a new lead. To create a different object record instead, such as a contact or opportunity, you can edit the flow's Create Records: Create New Lead element.
The steps in this article will show how to create a contact, but you can replace this with another object record of your choice.
How to create a contact instead of a lead in Salesforce
- 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.
-
Select the Create Records: Create New Lead element.
- Under Edit Create Records, at Label, enter Create New Contact.
- At API Name, update the name to Create_New_Contact.
- Under Create a Record of This Object, at Object, enter Contact.
- Under Set Field Values for the Contact, map the following Fields to their corresponding Values from Calendly:
- For the first field:
- Set the Field to FirstName.
- For the Value, select Calendly__CalendlyAction__c, then select Invitee First Name.
- Select +Add Field. For the second field:
- Set the Field to LastName.
- For the Value, select Calendly__CalendlyAction__c, then select Invitee Last Name.
- Select +Add Field. For the third field:
- Set the Field to Email.
- For the Value, select Calendly__CalendlyAction__c, then select Invitee Email.
- Select +Add Field. For the fourth field:
- Set the Field to OwnerId.
- For the Value, select OwnerId.
- For the first field:
- Check the box Manually assign variable.
-
Under Store Contact ID in Variable, at Variable, select WhoRecordId.
- Select Done.
- To save the flow, select Save. Select Save As to save the modified version of the flow. To activate the flow, select Activate. Note: you will also need to deactivate the CreateEventTemplate, so you don’t have duplicate events in Salesforce.
- From your setup page locate the Quick Find / Search box in the top left-hand corner, then type flows.
- Under Build>Workflows & Approvals, select Flows. See the page refresh.
-
At Flows, select Open for the CreateEvent flow.
Note: Your organization's visual builder may be viewed in the Classic or Lightning experience. Functionality remains the same. - Select the pre-existing Create Records, Create New Lead, element within the flow.
- At Label, enter Create New Contact.
- At Create a Record of this Object, and at Object, enter Contact.
- At Set Field Values for this Object, re-map all of the Fields to their corresponding Values from Calendly:
- FirstName to {!NewCalendlyAction.InviteeFirstName__c}
- LastName to {!NewCalendlyAction.InviteeLastName__c}
- Email to {!NewCalendlyAction.InviteeEmail__c}
- OwnerId to {!OwnerId}
- Variable to {!WhoRecordID} - Once finished, select Done.
Note: Both standard and custom fields in Salesforce can be mapped your invitees' responses to the first four custom questions on your event scheduling page using {!NewCalendlyAction.CustomResponse1__c} through {!NewCalendlyAction.CustomResponse4__c}, respectively. - To save the flow, select Save. Select Save As to save the modified version of the flow.
- To activate the flow, select Activate.
.