Creating dynamic scheduling links in Salesforce


In Salesforce, you can use custom fields and variables to create dynamic Calendly scheduling links based on the lead owner, contact owner, or another object record. To create dynamic links, you’ll need to add a user’s unique Calendly URL slug to their User record in Salesforce.

Use Cases

When scheduling meetings directly from Salesforce, you can use a dynamic Calendly link in a custom scheduling button, so the Calendly link used reflects the record owner.

How to create a dynamic scheduling link

  1. In Salesforce Lightning, on the User object, create a custom field called Calendly URL:
    1. From Setup, select Object Manager.
    2. Scroll down and select User.
    3. Select Fields & Relationships on the left side bar.
    4. In the upper right corner, select New.
    5. Under Field type, select Text, then select Next
    6. Under Field Label, enter Calendly URL. Under You Length, you can enter 255, or whatever your company prefers to use. Then select Next.
    7. For Field-Level Security, you can leave the setting as is, or select the checkbox next to Visible, to select all options. Select Next.
    8. Select Save.
  2. From Setup, enter Users in the Quick Find box, then select Users.
  3. Select a user. Under Additional Information, within their Calendly URL field, enter their Calendly event type URL slug as the value. Do not include http://www.
  4. Repeat these steps for each possible record owner, such as a lead owner.

  5. To add a dynamic link on an object, such as a Lead object, create a custom field called Owner_Link_Calendly.

  6. Under Advanced Formula, insert Owner:User.Calendly_URL__c:

  7. If you’re creating a custom button, follow the steps in the Lightning section of How to create a custom button to schedule Calendly meetings. For Step 5, enter the following Javascript code instead:{!Lead.Owner_Link_Calendly__c}?sfid={!Opportunity.Id}&name={!Contact.FirstName}%20{!Contact.LastName}&email={!Lead.Email}
  8. For your button to display in your page layout, make sure to complete the remaining steps in How to create a custom button to schedule Calendly meetings.