---
title: "Salesforce scheduling buttons for Opportunities"
description: "Salesforce scheduling buttons provide a quick method to schedule on behalf of a Customer. A schedule button on the Opportunity record allows quick scheduling..."
url: "https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/salesforce-scheduling-buttons-for-opportunities"
---

[Salesforce scheduling buttons](https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/introduction-to-salesforce-scheduling-buttons "Salesforce scheduling buttons") provide a quick method to schedule on behalf of a Customer. A schedule button on the Opportunity record allows quick scheduling with the Opportunity’s related Contact record. 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](https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/prepopulate-or-skip-booking-form-step-in-salesforce-integration "Prepopulating or skipping the Booking form step in Salesforce integration"). This is enabled by the [optional mapping step in the Salesforce setup wizard](https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/mapping-oncehub-fields-to-non-mandatory-salesforce-fields "Mapping ScheduleOnce fields to non-mandatory Salesforce fields"), where you can define the mapping between Salesforce record fields and OnceHub Booking form fields.

![](https://help.staticso2.com/_astro/1567504761394.B9VFJQ8H_Z2w7VfF.png)Figure 1: Schedule with related Contact button

In this article, you’ll learn how to add the **Schedule with related Contact** button to the Opportunity record Page Layouts in Salesforce.

## Requirements

[Section titled “Requirements”](#requirements)

To add the **Schedule with related Contact** button to the Opportunity Page layouts in Salesforce, you will need:

* A Salesforce Administrator for your organization.
* [A completed Salesforce connector setup in OnceHub](https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/connecting-salesforce-api-user "How to connect a Salesforce API User").
* [A OnceHub User connected to Salesforce](https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/connecting-to-salesforce "Connecting to Salesforce").

## Creating a Contact Lookup field

[Section titled “Creating a Contact Lookup field”](#creating-a-contact-lookup-field)

First, we will add a Lookup custom field to the Opportunity record.

1. Sign in to Salesforce as your [API User](https://help.staticso2.com/scheduleonce/account-integrations/crm/salesforce/connecting-salesforce-api-user "How to connect a Salesforce API User").

2. Go to the **Setup** page.

3. In the **Platform Tools** section, go to **Objects and Fields → Object Manager** (Figure 2). ![](https://help.staticso2.com/_astro/1567090296122.dWykdIXE_1sUtRY.png)Figure 2: Object Manager in the Objects and Fields menu

4. In the **Object Manager** list, select the **Opportunity** object (Figure 3). ![](https://help.staticso2.com/_astro/1567499089104.si4n69NK_2c8oLw.png)Figure 3: Opportunity in the Object Manager list

5. Select **Field & Relationships → New** (Figure 4). ![](https://help.staticso2.com/_astro/1567499170907.XSR3o8QR_Z2TaiI.png)Figure 4: Fields & Relationships

6. In the **New** **Custom Field** pane, select **Lookup Relationship** and **Next** (Figure 5). ![](https://help.staticso2.com/_astro/1567499651359.fkV2nFHI_Z2udJt9.png)Figure 5: New Custom Field—Step 1

7. In the **Related to** drop-down menu, select **Contact**.

8. Click **Next**.

9. Enter a label and name for the Lookup field, then click **Next** (Figure 6).

   * Field Label: **Contact**
   * Field Name: **Contact\_ID** **![](https://help.staticso2.com/_astro/1567499576191.C6p3UYco_Z2rqRsf.png)Figure 6: New Relationship**

10. In Step 4 and Step 5, click **Next**.

11. In Step 6, click **Save**.

## Creating a button in Salesforce

[Section titled “Creating a button in Salesforce”](#creating-a-button-in-salesforce)

Now you can create the button to add to the Opportunity Page Layout. The button will retrieve the Contact ID from the custom Contact Lookup field. When clicked, you will be able to make a booking on behalf of the Contact added to that Opportunity.

Note

You can also follow the steps below for Custom objects. In this case, the button and the custom Lookup field should be added to a Custom object instead of the Opportunity Page Layout.

1. Go to the **Setup** page.

2. In the **Platform Tools** section, go to **Objects and Fields → Object Manager**.

3. Select the **Opportunity** object.

4. Select **Buttons, Links, and Actions → New Button or Link** (Figure 7). ![](https://help.staticso2.com/_astro/1567496662025.2sBwAiI-_1QsCVN.png)Figure 7: New Button or Link

5. In the **New Button or Link** pane, enter the following information:

   * Label: **Schedule with related Contact**
   * Name: **Schedule\_with\_related\_Contact**
   * Description: **This button allows you to schedule meetings on behalf of the Contact related to this Opportunity record.**
   * Display Type: **Detail Page Button**
   * Behavior: **Display in new window**
   * Content Source: **URL**

6. Copy the following link and paste it in the large text box (Figure 8).

   ```plaintext
   https://go.oncehub.com/EXAMPLEBOOKINGPAGE?so&Skip=1&sfLeadId={!Lead.Id}&sfContactId={!Opportunity.Contact_IDid__c}&sfCaseId={!Case.Id}
   ```

   ![](https://help.staticso2.com/_astro/1567504452245.C1gdaQCh_2ac7LI.png)Figure 8: Paste link in the large text box

7. Replace the placeholder URL (Figure 9) with the [Public link](https://help.staticso2.com/scheduleonce/sharing-publishing/general-one-time-links/using-general-links "Using General links") 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](https://help.staticso2.com/scheduleonce/event-types-booking-pages/booking-pages/booking-pages-overview "Booking page: Overview section") or [Master page Overview section](https://help.staticso2.com/scheduleonce/master-pages-resource-pools/master-pages/master-pages-overview "Master page: Overview section"). ![](https://help.staticso2.com/_astro/1567504561201.D2Oo_kOa_Z1Bzsil.png)Figure 9: 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=\`{!Lead.Id}\`\\\&sosfContactId=\`{!Opportunity.Contact\_IDid\_\_c}\`\\\&sosfCaseId=\`{!Case.Id}\`](https://go.oncehub.com/danafisher?soSkip=1\&sosfLeadId=%60%7B!Lead.Id%7D%60%5C\&sosfContactId=%60%7B!Opportunity.Contact_IDid__c%7D%60%5C\&sosfCaseId=%60%7B!Case.Id%7D%60)*

8. Click **Save.**

## Adding a button to Salesforce Page Layouts

[Section titled “Adding a button to Salesforce Page Layouts”](#adding-a-button-to-salesforce-page-layouts)

The next step is to add the new button you’ve created [](https://help.salesforce.com/articleView?id=customize_layout.htm\&type=5)to the relevant Salesforce Opportunity Page Layouts.

Note

Page Layouts control which buttons are visible. If you want to display the buttons only to specific Salesforce Users, you can assign your Page Layouts to specific Users. [Learn more about assigning Page Layouts to Profiles](https://help.salesforce.com/articleView?id=customize_layoutassign.htm\&type=5)

1. In **Opportunities**, click **Page Layouts** and then select the Layout you want to add a button to (Figure 10). ![](https://help.staticso2.com/_astro/1567500191442.bEPGkEyV_Z1YTTCD.png)Figure 10: Page Layouts
2. In the Opportunity Layout editor, select **Mobile & Lightning Actions** (Figure 11). ![](https://help.staticso2.com/_astro/1567500328380.BMstiqDp_1bmfF8.png)Figure 11: Mobile & Lightning Actions
3. Click and drag the **Schedule with related Contact** button to the **Salesforce Mobile and Lightning Experience Actions** section (Figure 12). ![](https://help.staticso2.com/_astro/1567500475658.CBnbMQpz_Z17Xil9.png)Figure 12: 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 Opportunity pages.
