--- title: "Define a Compare action" slug: "add-compare-action" description: "Learn how to add a Compare action button to your deal. " updated: 2023-04-25T21:24:21Z published: 2023-04-25T21:24:21Z canonical: "docs.zilliant.com/add-compare-action" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zilliant.com/llms.txt > Use this file to discover all available pages before exploring further. # Add a Compare action button To add and enable a **Compare** action button, you must: - [Create a Lightning component](/v1/docs/add-compare-action#create-a-lightning-component) - [Create the action button](/v1/docs/add-compare-action#create-the-compare-action-button) - [Drop the action button on the object layout](/v1/docs/add-compare-action#drop-the-action-button-on-the-object-layout) - [Add the action button to the Lightning record page](/v1/docs/add-compare-action#add-the-action-button-to-the-lightning-record-page) ## Create a Lightning component 1. Go to **Developer Console > File > New > Lightning Component**. 2. In the New Lightning bundle dialog, in the **Name** field, enter a custom name for your component. 3. Select **Submit**. 4. Replace the **.cmp** markup file with the following: ``` ``` 5. Replace the value for the **Unique Nickname of the Scenario Configuration** attribute with the nickname of the scenario configuration you want to use. 6. Save the component. ## Create the Compare action button 1. From the **Setup** interface in the customer's org, go to **Object Manager** and select your header object. 2. In the **Buttons, Links and Actions** section, select **New Action**. 3. In the **Label** and **Name** fields, enter **Compare**. 4. From the **Action Type** dropdown, choose **Lightning Component**. 5. From the **Lightning Component** dropdown, choose the name of the component you created in [Create a Lightning component](/v1/docs/add-compare-action#create-a-lightning-component). 6. In the **Height** field, specify **250px**. 7. Select **Save**. ## Drop the action button on the object layout 1. Go to **Page Layouts** for this object and select a layout. 2. In the **Mobile & Lightning Actions** section, find the **Compare** action button. 3. Drag it to the correct place in the layout. 4. Select **Save**. ## Add the action button to the Lightning record page If the Lightning record page is using dynamic forms, you must also add the action to the Lightning record page.