Beta: This page contains beta features and may change.
Use case examples
- Relationship and company research: Combine Affinity data with other systems in your stack (email, calendar, CRM, deal room, etc.).
- Example: “Who is the main contact for Acme Corp and have we had any meetings with them recently?”
- Opportunity and list workflows: Research about lists and opportunities assigned to you and find out additional information.
- Example: “All open opportunities where the close date is next month and amount > 100K US Dollars, assigned to me.”
Limitations
- Notes and reminders in Affinity are not crawled or indexed.
- All supported objects use full crawls only; there is no incremental crawl yet. Changes may take up to about one hour (or your configured full‑crawl interval) to appear in Glean search.
- Additional fields beyond the default set must be configured by Glean; there is no self-serve UI for admins to add or change Affinity fields.
Objects and data indexed
Objects crawled
The Affinity connector crawls the following object types:- People
- Organizations (Companies)
- Opportunities
- Lists
Default fields indexed
By default, Glean indexes the following attributes for each Affinity object type. You can work with Glean to add additional custom fields on a per‑customer basis. People- First name
- Last name
- Primary email address
- All email addresses
- Current job title
- Current organization
- Phone number
- Industry
- Location
- Last email
- Name
- Domain
- All domains
- Description
- Industry
- Location
- Investment stage
- Total funding amount (USD)
- Year founded
- Investors
- Last funding date
- Number of employees
- Last email
- Name
- People (associated contacts)
- Status
- Owners
- Organizations (associated companies)
- Amount
- Close date
- Last email
- Created by
- Created at
- Name
- Type
- Visibility / Is public
- Owner
- Created by
List‑specific properties for People and Companies are not currently supported as indexed fields in Glean.
Permissions and visibility
Affinity enforces access through a combination of workspace‑wide visibility and list‑level sharing. The connector mirrors these rules in Glean.| Authorization layer | Required action | Indexed scope | Permissions |
|---|---|---|---|
| Workspace authorization (Admin-level) | A Glean administrator connects the company’s Affinity workspace via OAuth. | Enables Glean to crawl People and Organizations (workspace-wide data). | Affinity treats these as workspace‑wide relationship data. By default they are visible to all users in the Affinity workspace, and Glean exposes them consistently in search. |
| End-user authorization (Per-user OAuth) | Each Affinity user must complete their own separate OAuth flow with Affinity through Glean. | Enables Glean to crawl and expose that user’s specific Opportunities and Lists. | Access is controlled primarily at the List level in Affinity. Users can only see opportunities and lists that they have access to in Affinity and for which they have completed OAuth in Glean. |
Authentication and authorization mechanism
OAuth model
Glean integrates with Affinity using OAuth 2.0 Authorization Code Grant as a confidential client.- Affinity has created and registered a central Glean OAuth app that is reused for all customers. Affinity does not currently support per‑customer apps for this integration.
- The Glean app must be greenlisted for each customer’s Affinity workspace before OAuth will succeed. Customers must work with Affinity Support to get the central Glean client approved for their workspace; otherwise OAuth attempts are likely to fail.
API endpoints used
The connector uses the following Affinity v2 API endpoints to fetch data:| Object | API endpoint |
|---|---|
| Contacts | GET /v2/persons |
| Companies | GET /v2/companies |
| Opportunities | GET /v2/lists/<list-id>/list-entries |
| Lists | GET /v2/lists |
Requirements
To use the Affinity connector, you need the following:- A Glean deployment where the Affinity connector has been enabled.
- Access to the Glean Admin Console with permission to add new data sources.
- An Affinity workspace where:
- Affinity Support has greenlisted the central Glean OAuth client for your workspace.
- At least one admin user who can complete workspace‑level OAuth with Glean.
- End users can complete per‑user OAuth as needed for opportunities and lists.
Setup and configuration
Step 1: Admin setup (workspace authorization)
Workspace‑level setup is performed by a Glean admin.- In the Glean Admin Console, go to Data sources > Add data source and select Affinity.
- Enter your Affinity workspace details as prompted.
- Click Authorize and complete the Affinity OAuth flow using an appropriate admin account. This grants Glean access to workspace‑wide Contacts (People) and Companies (Organizations).
- Save the data source configuration.
Step 2: Per‑user OAuth (end‑user authorization)
For Opportunities and Lists, each Affinity user who needs access must complete an additional OAuth step:- Each user authenticates with Affinity via the Glean interface (per‑user OAuth flow).
- Once a user has completed this OAuth flow:
- Glean enqueues crawls for that user’s Opportunities and Lists.
- Those items become visible to that user in Glean, subject to Affinity’s list‑based permissions.
Admin setup alone is sufficient for Contacts and Companies; per‑user OAuth is specifically required for private or user‑scoped Opportunities and Lists.
Crawling strategy and update frequency
Full crawl
- For each supported Affinity object type—People, Organizations, Opportunities, Lists, and their associated schemas—the connector currently performs full crawls only (no incremental crawls).
- By default, a full crawl for each object type and its schema runs approximately once per hour, although this cadence can be adjusted via configuration by Glean.
- Because the connector relies solely on full crawls, changes made in Affinity can take up to about one hour (or your customized full‑crawl interval) to appear in Glean search and Assistant responses.
Identity and schema crawling
In addition to object records, the connector:- Crawls schemas for People, Organizations, Opportunities, and Lists to keep field definitions in sync.
- Performs access token refresh operations as a separate object crawl, ensuring OAuth tokens remain valid without admin intervention.
Advanced configuration (by Glean)
The following advanced configurations can be performed by Glean:Crawl frequency tuning
Glean can tune the full crawl frequency for each Affinity object type (People, Companies/Organizations, Lists, Opportunities, schemas, and token refresh) via internal configuration, expressed in seconds. This allows, for example, more frequent crawls of Opportunities relative to Lists or People if needed for deal workflows.Field selection and custom fields
For supported objects, the connector distinguishes between:- Basic fields – the default set of fields that are always fetched for the object (for example, name, email, title, and location for People).
- Additional fields – supplemental fields that can be added per customer (for example, custom properties on Contacts, Companies, or Lists).
- Field lists are defined using the exact field names from the customer’s Affinity instance (including spaces and case), and are case‑sensitive.
- By default, only the predefined basic fields are enabled; the additional‑fields list starts empty.
- To add custom fields, customers must work with Glean (Solutions Architects / Support). There is currently no self‑serve UI for adding new Affinity fields directly.
FAQs
Why can’t a user see Opportunities or Lists from Affinity in Glean?
Why can’t a user see Opportunities or Lists from Affinity in Glean?
Confirm that the user has completed the per‑user OAuth step for the Affinity connector in Glean. Without this additional OAuth, Glean will not enqueue crawls for that user’s Lists and Opportunities, and those records will not appear in Glean search for that user.
Why is OAuth failing when I try to set up the Affinity connector?
Why is OAuth failing when I try to set up the Affinity connector?
If OAuth fails during initial connector setup:
- Verify that Glean’s OAuth client has been greenlisted for your Affinity workspace.
- Work with Affinity Support to ensure the central Glean app is approved for your tenant.
- Only after greenlisting is complete should you retry OAuth from the Glean Admin Console.
Why aren’t Notes searchable?
Why aren’t Notes searchable?
Notes are exposed as separate objects in the Affinity API and are currently excluded from the connector due to evolving API support and complex permissions. For now, Glean indexes only People, Organizations, Opportunities, and Lists.
How do I add custom fields from Affinity?
How do I add custom fields from Affinity?
If you want Glean to index additional custom fields beyond the defaults:
- Contact your Glean Solutions Architect or Account team with a list of the exact field names from your Affinity instance.
- Glean can configure these fields on the backend as either basic or additional fields for the supported objects (People, Companies, Lists), using the exact, case‑sensitive field names.
How long do changes in Affinity take to show up in Glean?
How long do changes in Affinity take to show up in Glean?
The connector uses full crawls only, changes in Affinity (such as new opportunities, updated fields, or new relationships) can take up to the configured full‑crawl interval—by default, about one hour—to appear in Glean search. This interval can be adjusted by Glean on a per‑object basis if needed.