# The 1:1 SMS Lightning Component

With Twilio for Salesforce, you can send 1:1 messages to contacts and leads directly from your Salesforce instance. You don't need to reveal your personal number, and conversations are visible on the contact record.

The component can be [set up under Lightning](#lightning-setup), but it can also be [added with Classic](#classic-setup).

> \[!NOTE]
>
> Your recipient must have a **mobile phone number** on their record to use this feature — other phone numbers can't be used.

## Video Tutorial

This short video will show you how to set up the 1:1 SMS component using Lightning, but you can also [jump down to a step-by-step guide](#lightning-setup).

https://www.youtube.com/watch?v=mFzkeKuFt7Y

## Lightning Setup

1. Open an individual Contact, Lead, Person Account, or Case record.
2. Under the gear icon in the top right corner, click on **Edit Page** . You'll be brought to the Lightning editor:

   ![Salesforce setup menu with arrow pointing to Edit Page option.](https://docs-resources.prod.twilio.com/a0016b81008117b44e95bd0a9436b33528d589ec3affae11bbf46c79457ad38d.png)
3. In the menu on the left-hand side, scroll down to **Custom — Managed** . Drag and drop the Lightning component into the page layout:

   ![Salesforce sidebar showing Twilio components under Custom Managed section.](https://docs-resources.prod.twilio.com/4ca913efd49e2b45c50bb17626512ce63f78d8db39540a21cda9d75820a20350.png)
4. Click **Save** in the top-right corner:![Arrow pointing to Save button on Salesforce Contact Record Page setup.](https://docs-resources.prod.twilio.com/973ee78bda661a5118dbccb76c45f1172d52785295f0d850eb27fa8cda09ac66.png)
5. You'll now need to assign this layout as the organization's default. To do this, click the **Activation...** button: ![Arrow pointing to Activation button on Salesforce contact record page.](https://docs-resources.prod.twilio.com/92c5f8f2f931815b10ddb7cba6481567b492047015cc73ac8480f6880b2c50fe.png)
6. Click on the **Assign as Org Default** button in the **Activation: Contact Record Page** panel that appears: ![Activation window for setting contact record page as org default with an arrow pointing to 'Assign as Org Default'.](https://docs-resources.prod.twilio.com/ad2fe28b1a3305f8d60ccc0242c64befc803cb9e9dcd211a910fe17af2de04d2.png)
7. Click the **Close** button.
8. Verify that the 1:1 Component is appearing correctly by clicking the **Back** button at the top of the page. You'll see the 1:1 Messaging Component on the record's layout.

> \[!WARNING]
>
> If you don't see any custom components in Step 3, you probably need to enable MyDomain for your Salesforce Organization. You can read more about enabling MyDomain [by checking out Salesforce's documentation](https://help.salesforce.com/articleView?id=domain_name_overview.htm\&type=5).

## Classic Setup

1. Click on the **Setup** button in the top-right corner Salesforce:

   ![Red arrow pointing to Setup link in Salesforce Classic interface.](https://docs-resources.prod.twilio.com/82cc9b5df354cb6e0005813cb2f604bfbd7ec5b2cad4fdab42cef97de47ec452.png)
2. In the side bar under **Customize** , click on the object that you would like to add the 1:1 Messaging Component to. Twilio for Salesforce currently supports Leads, Contacts, Person Accounts, and Cases. In this example, we're customizing our **Contacts** layout, so open that entry:

   ![Salesforce setup menu with arrow pointing to Page Layouts under Contacts.](https://docs-resources.prod.twilio.com/13a43606219c3b179ddab693e855b7a49d80232e5f2e7c1437f772ec2ba880d1.png)
3. Clock on **Page Layouts** and select the layout that you would like to customize for your object. In this example, we're customizing the general object layout, **Contact Layout** , but you could also only customize the sales or service layout for your organization:

   ![Arrow pointing to Edit link for Contact Layout in page layout list.](https://docs-resources.prod.twilio.com/b5ba3f6f6f63b800fbeef29ac9320bad056301023207d5f57d5b89b6fc1157cc.png)
4. On the layout editor page, click on **Visualforce Pages** . You'll see **Twilio - Two Way Messages** as a visualforce component that you can add to the layout:

   ![Salesforce Classic layout with Visualforce Pages highlighted in the sidebar.](https://docs-resources.prod.twilio.com/5b0bf3a6ca49b2b9b3f0cee9f92dfa11c6a087ed6c619e0a82e081700df06274.png)
5. Drag and drop the visualforce component onto the layout page where you would like to have it be displayed to users:

   ![Drag Twilio Two Way Messages component to Visualforce page layout.](https://docs-resources.prod.twilio.com/c4198b1a9d2482bcb2a049be41d3cfd89d7021a1db21e7e8cc0acb7c058768ff.png)
6. Once it is in the right spot, click **Save** .
7. Configure the height of the visualforce component by clicking on the wrench icon in the top-right corner of the component:

   ![Visualforce component with Twilio Two Way Messages and a highlighted wrench icon.](https://docs-resources.prod.twilio.com/5bf719aff64d0294a4551945cf6efd23a28d840bb9c4cb7a410cab7baa7adc4c.png)
8. Set the component's height to 600 pixels so that the message thread is visible, then click **OK** :

   ![Visualforce Page Properties dialog with width set to 100% and height to 600 pixels.](https://docs-resources.prod.twilio.com/fe4851cdbc7983155a87aa1e56c72169292b3c434383549dd3b6e174a5d4fb05.png)
