# Salesforce

> Enterprise CRM and sales platform

Salesforce tracks your pipeline and customer relationships, but understanding which marketing channels drive your best deals or how support cases affect renewal rates requires connecting to ad platforms, analytics tools, and payment data.

Filament links your Salesforce accounts, opportunities, and campaigns to the rest of your business intelligence stack and answers questions about attribution, pipeline velocity, and customer lifetime value in plain English.

## Data we sync

- **ACCOUNT**: Track company records and relationships with Name, Industry, AnnualRevenue, NumberOfEmployees, and Type to analyze customer segments and account health. (`Name`, `Industry`, `AnnualRevenue`, `NumberOfEmployees`, `Type`, `AccountSource`, `BillingCountry`)
- **CONTACT**: Monitor individual contacts with FirstName, LastName, Email, LeadSource, and AccountId to understand relationship networks and engagement patterns. (`FirstName`, `LastName`, `Email`, `LeadSource`, `AccountId`, `Title`, `Department`)
- **LEAD**: Analyze prospective customers with LeadSource, Status, Rating, Company, and ConvertedDate to measure lead quality and conversion velocity. (`LeadSource`, `Status`, `Rating`, `Company`, `ConvertedDate`, `Industry`, `AnnualRevenue`)
- **OPPORTUNITY**: Track sales pipeline with StageName, Amount, CloseDate, Probability, and LeadSource to calculate win rates and forecast accuracy. (`StageName`, `Amount`, `CloseDate`, `Probability`, `LeadSource`, `AccountId`, `IsClosed`)
- **CASE**: Monitor customer support with Status, Priority, Origin, Subject, and ClosedDate to identify resolution patterns and service quality trends. (`Status`, `Priority`, `Origin`, `Subject`, `ClosedDate`, `AccountId`, `ContactId`)
- **TASK**: Review completed activities with Subject, Status, ActivityDate, and WhoId to understand team productivity and customer touchpoint frequency. (`Subject`, `Status`, `ActivityDate`, `WhoId`, `WhatId`, `Priority`)
- **EVENT**: Track calendar events with Subject, StartDateTime, EndDateTime, and WhoId to analyze meeting patterns and customer engagement cadence. (`Subject`, `StartDateTime`, `EndDateTime`, `WhoId`, `WhatId`, `Location`)
- **CAMPAIGN**: Measure marketing campaigns with Name, Type, Status, StartDate, and BudgetedCost to evaluate campaign performance and spending efficiency. (`Name`, `Type`, `Status`, `StartDate`, `BudgetedCost`, `ActualCost`, `NumberOfLeads`)
- **CAMPAIGNMEMBER**: Connect contacts to campaigns with CampaignId, ContactId, Status, and FirstRespondedDate to track campaign response and attribution. (`CampaignId`, `ContactId`, `Status`, `FirstRespondedDate`, `LeadId`, `HasResponded`)

## How do I connect Salesforce?

You need Salesforce Enterprise or higher, or a plan with purchased API access. Use a Salesforce user with permission to read the objects and fields you want to sync. An administrator must approve the initial app connection.

### Prepare the Salesforce user

1. In **Setup → Permission Sets**, create or edit a permission set for the connecting user.
2. Enable **Approve Uninstalled Connected Apps**, or **Use Any API Client** if your organisation uses API Access Control. Save, then use **Manage Assignments → Add Assignments** to assign it to the user.
3. In the user’s object settings, grant read access to the standard objects, custom objects and fields you want. **Read** follows record-sharing rules; **View All** also exposes records outside those rules. Enable **View Setup and Configuration** so the connection can check API limits.

You can remove the app-approval permission once the connection is successfully syncing.

### Check restricted access

If your organisation restricts login IPs or locks sessions to an IP address, contact [Filament](mailto:team@filamentanalytics.com) before you connect and we'll help you set it up.

### Connect in Filament

1. Open [Apps](https://filamentanalytics.com/apps) in Filament and add **Salesforce** for your production organisation.
2. Sign in as the prepared user when prompted and approve the requested access.
3. Choose the objects to sync, and the objects whose field history you want, then return to Filament and complete setup.

For field-change history, enable it before collecting changes: in Salesforce **Setup → Object Manager**, open the relevant object, then **Fields & Relationships → Set History Tracking**. Enable tracking, select the fields and save.
