### Getting Started

- ## 1. Install the managed "Align.ly Attribution" package from the Salesforce AppExchange

1. Go to the Align.ly Attribution listing on the Salesforce AppExchange: [https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000GAZGYUA5](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000GAZGYUA5)
2. Click...
     1. For Production: "Get It Now"
     2. For Sandbox: "Try It"
4. When installing, select "Install for All Users" then click "Install".

- ## 2. Install the unmanaged "Align.ly Attribution Extension" package

1. Install using the following one of the following links:
     1. Production: [https://login.salesforce.com/packaging/installPackage.apexp?p0=04tfn000001UZqz](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tfn000001UZqz)
     2. Sandbox: [https://test.salesforce.com/packaging/installPackage.apexp?p0=04tfn000001UZqz](https://test.salesforce.com/packaging/installPackage.apexp?p0=04tfn000001UZqz)
3. When installing, select "Install for All Users" then click "Install".

- ## 3. Add the Campaign Member Related Lists to Opportunity

To add Campaign Member Related Lists to Opportunity, follow these steps:

01. Go to Setup -> Object Manager -> Opportunity -> Page Layouts
02. Select the Opportunity Page Layout you'd like to update (you may need to repeat these steps for more than one page layout)
03. Navigate to "Related Lists"

05. Based on if you plan on using Account-Based attribution, Opportunity-Based attribution, or both, drag the appropriate related lists into your page layout

07. Click the wrench icon on the related list and update the columns accordingly. Here are our recommended columns:

09. Sort your related list by "Engagement Date" and choose "Descending"

11. Save your page layout and that's it!

- ## 4. Update the Campaign Member Page Layout to use the Align.ly Attribution version

1. Go to Setup -> Object Manager -> Campaign Member -> Page Layouts
2. Select "Page Layout Assignment"
3. Click the "Edit Assignment" button
4. Select the page layout for all profiles (highlighted in purple)

6. Under "Page Layout To Use" select "Campaign Member Page Layout (Align.ly Attribution)"

8. Click "Save"

- ## 5. Add "Engagement Date" and "View" to Campaign History related lists on Lead and Contact

### Update on Lead

1. Go to Setup -> Object Manager -> Lead -> Page Layouts
2. Select the Lead Page Layout you'd like to update (you may need to repeat these steps for more than one page layout)
3. Find the "Campaign History" related list and click the "wrench" icon

5. Remove "Member Status Updated" and then add "Engagement Date" and "View"

7. Sort the list by "Engagement Date" and "Descending"

9. Click "Save"

### Update on Contact

1. Go to Setup -> Object Manager -> Contact -> Page Layouts
2. Select the Contact Page Layout you'd like to update (you may need to repeat these steps for more than one page layout)
3. Find the "Campaign History" related list and click the "wrench" icon

5. Remove "Member Status Updated" and then add "Engagement Date" and "View"

7. Sort the list by "Engagement Date" and "Descending"

9. Click "Save"

- ## 6. (If applicable) Update Formula fields on Campaign Member to use custom Amount field

- ## 7. Update Dashboard Filters

- ## 8. (If applicable) Exclude specific Opportunity Record Type or Opportunity Types

It is common to want to exclude specific types of Opportunities before running Align.ly Attribution. The most common example is to exclude "Renewal" Opportunities and that is typically done by excluding an Opportunity Record Type or an Opportunity Type. If you have this requirement, here are the steps to follow:

### For Opportunity-based Model

1. Go to Setup -> Custom Settings -> Align.ly Attribution -> Click "Manage"
2. Find the "WHERE Clause for Contact Role (OB)" setting
3. As an example, enter Opportunity.Type != 'Renewal' to exclude Opportunity Types of "Renewal"
4. Click "Save"

### For Account-based Model

1. Go to Setup -> Custom Settings -> Align.ly Attribution -> Click "Manage"
2. Find the "WHERE Clause for Opportunity (AB)" setting
3. As an example, enter Type != 'Renewal' to exclude Opportunity Types of "Renewal"
4. Click "Save"

- ## 9. Running and Scheduling Align.ly Attribution

1. In the App Launcher (9 dots) search "Align.ly Attribution" and click into the app

3. Click "Run and Calculate Attribution Models" to run Align.ly Attribution

5. Pick a time to schedule Align.ly Attribution to run at that time each day (you can schedule multiple times if needed)
