Skip to content

Salesforce scheduling buttons for Contacts, Leads and Cases [Classic]

Salesforce scheduling buttons provide a quick method to schedule on behalf of a Customer. Bookings made via these buttons are automatically added to the Salesforce record that the booking is scheduled from.

Salesforce scheduling buttons can be configured to prepopulate the booking form, or skip it altogether. This is enabled by the optional mapping step in the Salesforce setup wizard, where you can define the mapping between Salesforce record fields and OnceHub Booking form fields.

Figure 1: Salesforce scheduling buttons

In this article, you’ll learn how to create a Salesforce schedule button and add it to the Lead, Contact or Case Page Layouts in Salesforce.

<script id="snippet-prepend">
$(function(){
/*disable in widget*/
if($('.w-documentation-article').length === 0){
var ToC =
"&lt;nav role='navigation' class='table-of-contents toc-top'><h4>In this article:" + "<ul>";
var el, title, link, header;
//Define the heading levels you want to use in ascending order. Can add extra or remove unneeded.
$(".hg-article-body h1, .hg-article-body h2, .hg-article-body h3, .hg-article-body h4").each(function() &#123;
el = $(this);
title = el.text();
if(title != '')&#123;
anchorTitle = el.text().replace(/([~!@#$%^&*()_+=`&#123;&#125;\[\]\|\\:;'&lt;>,.\/\? ])+/g, '-').toLowerCase();
link = "#" + anchorTitle;
//Set all headers to a 0-nesting level.
header = 'header-nesting-0';
//Adjust header-nesting layers so that they point to the correct html tag. header-nesting-1 should match the second .hg-article-body h# listed above; header-nesting-2 should match the third, etc.
if($(this).is('h2'))&#123;
header = 'header-nesting-1';
&#125;else if($(this).is('h3'))&#123;
header = 'header-nesting-2'
&#125;
el.html('<a id="'+anchorTitle+'" class="toc-anchor">' + el.html());
newLine =
"<li class='"+header+"'>" +
"<a class='article-anchor' href='" + link + "'>" +
title +
"" +
"";
ToC += newLine;
&#125;
&#125;);
ToC +=
"" +
"";
$("#snippet-prepend").before(ToC);
&#125;
&#125;);
&lt;/script>
&lt;style>
/* CSS to style the TOC as it displays and the auto-created anchors
.toc-top styles the box for the TOC; adjust styles here to tweak look and feel */
.toc-top &#123;
background-color: #FAFAFA; /* set to #fff or delete entirely for no background */
border: 1px solid #C8C8C8; /* adjust the color hex here to change border color */
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
margin-top: 24px;
margin-bottom: 36px;
min-height: 20px;
padding: 13px 20px;
max-width: 75%;
&#125;
.toc-top h4 &#123;
font-size: 18px;
line-height: 26px;
margin: 0 0 8px;
font-weight: 400;
&#125;
.toc-top ul &#123;
padding: 0 0 0 15px !important;
margin-bottom: 0;
&#125;
.toc-top > ul &#123;
margin-bottom: 13px!important;
&#125;
.toc-anchor &#123;
display: block;
height: 90px;
margin-top: -90px;
visibility: hidden;
&#125;
/* Set the indentation for the nesting levels. May need to be edited to match changes above. Increase or decrease the margin-left to get your desired level of indentation. */
.header-nesting-1 &#123;
margin-left: 14px;
&#125;
.header-nesting-1:before &#123;
background-image: url(https://dyzz9obi78pm5.cloudfront.net/app/image/id/5d31bcc88e121c9b25ba22c4/n/bulletv2.svg)!important;
&#125;
.header-nesting-2 &#123;
margin-left: 28px;
&#125;
.header-nesting-2:before &#123;
background-image: url(https://dyzz9obi78pm5.cloudfront.net/app/image/id/5d31be536e121cf22b0cc6ae/n/bulletv3.svg)!important;
&#125;
&lt;/style>

To add a button to the Lead, Contact, or Case Page Layouts in Salesforce, you will need the following:

  1. Sign in to Salesforce as your API User.

  2. Go to the Setup page.

  3. In the Platform Tools section, go to Objects and Fields -> Object Manager (Figure 2).
    Figure 2: Object Manager in the Objects and Fields menu

  4. In the Object Manager list, select the Lead, Contact, or Case object depending on which one you want to create a button for (Figure 3).
    Figure 3: Lead in the Object Manager list

  5. Select Buttons, Links, and Actions -> New Button or Link (Figure 4).
    Figure 4: New Button or Link

  6. In the New Button or Link pane, enter the following information (Figure 5):

    • Label: This is the text that will be displayed on the button.
    • Name: Enter a unique name for the button.
    • Description: Enter a description for the button.
    • Display Type: Select Detail Page Button.
    • Behavior: Select Display in new window.
    • Content Source: Select URL.
      Figure 5: New Button or Link pane
  7. Copy the following link and paste it in the large text box (Figure 6).

    https://go.oncehub.com/EXAMPLEBOOKINGPAGE?soSkip=1&sosfLeadId=&#123;!Lead.Id&#125;&sosfContactId=&#123;!Contact.Id&#125;&sosfCaseId=&#123;!Case.Id&#125;

    Figure 6: Paste link in the large text box

  8. Replace the placeholder URL (Figure 7) with the Public link of the Booking page or Master page that you want to use for the new button. You can find the Public link in the Booking page Overview section or Master page Overview section.
    Figure 7: Placeholder URL text For example, if you want to create a button for a Booking page with the Public link https://go.oncehub.com/danafisher, your finished link would be:

    https://go.oncehub.com/danafisher?soSkip=1&sosfLeadId=&#123;!Lead.Id&#125;&sosfContactId=&#123;!Contact.Id&#125;&sosfCaseId=&#123;!Case.Id&#125;

  9. Click Save.

Adding a button to Salesforce Page Layouts

Section titled “Adding a button to Salesforce Page Layouts”

The next step is to add the new button you created to the relevant Salesforce Page Layout.

Note Page Layouts control which buttons are visible. If you want to display your custom buttons only to specific Salesforce Users, you can assign your Page Layouts to specific Users. Learn more about assigning Page Layouts to Profiles

  1. In the Lead, Contact, or Case page, click Page Layouts and then select the Layout you want to add a button to (Figure 8).
    Figure 8: Page Layouts
  2. In the Lead Layout editor, select Mobile & Lightning Actions (Figure 9).
    Figure 9: Mobile and Lightning Actions
  3. Click and drag the button that you want to add to the Salesforce Mobile and Lightning Experience Actions section (Figure 10).
    Figure 10: Add button to Salesforce Mobile and Lightning Experience Actions section
  4. Click Save.

You’re all set! Your button is now ready to use on your Lead, Contact, or Case pages.