## Capabilities

DataGrail's Segment Public integration provides the following capabilities:

| Product | Capability |
| --- | --- |
| [Request Manager](https://docs.datagrail.io/docs/request-manager/getting-started) | Request Types | Access,Deletion,Do Not Sell/Share |
| Identifier Categories | Email,User ID |
| [Live Data Map](https://docs.datagrail.io/docs/ldm/ldm-overview) | System Detection |

## Before You Start

To successfully configure this integration, please ensure you have sufficient privileges:

- **DataGrail User Role:** Super Admin, Connections Manager
- **Segment Public User Role:** Admin

## Configure Segment Public API Access

1. Log in to **Segment Public**.
2. Navigate to **Settings** from the left side menu.
3. Open **Workspace settings**.
4. In **General Settings** tab, below Workspace Name, copy your **Workspace identifier (ID)**.
5. Go to the **Access Management** tab and open **Tokens**.
6. Select the **Create Token** button.
7. Add a **Description**, select **Workspace Owner**, and select the **Create** button.
8. Copy the **Token** and temporarily store it in a secure place.
9. Select the **Done** button.

## Configure Segment Engage & Unify API

In order to search and delete personal data for the end-users collected via sending data to **Segment** through your **Segment** sources, the **Segment Engage & Unify API** must be configured.

1. Log in to the **[Segment Dashboard](https://app.segment.com/login?)** with your account.
2. On the left-side menu select **Unify** and navigate to **Unify Settings**.
3. Open **API access** tab.
4. Copy your **Space ID** to access the Profile API.
5. Select **Generate Token**.
6. Enter the **Token name** and **Password** from your account.
7. Select the **Generate Token** button.
8. Copy your **Access Token** and temporarily store it in a secure place.
9. Select **'I have written down this access token'** and then **Done**.

## Connect to DataGrail

1. Navigate back to **DataGrail**.
2. Enter the **API Token** and **Workspace identifier (ID)** obtained in the previous section.
3. Select **Data Residency**.
4. Optionally, enter the **Segment Engage Space ID** and **Segment Engage Access Secret (Access Token)** obtained earlier.
5. Select your desired **[Asynchronous Deletion Behavior](https://docs.datagrail.io/docs/request-manager/request-processing/overview#asynchronous-api)**.

**Mark integration as complete when a deletion request is successfully submitted:** The Segment Public Integration will be marked as "complete" as soon as the deletion request is submitted to Segment Public.

**Continue processing until the deletion request is completed (default behavior):** The Segment Public Integration will show a "processing" status until the Segment Public deletion is complete.

6. Select **Configure Integration**.

## Next Steps

Now that you've successfully connected the integration, check out the following resources:

- [Synchronous vs. Asynchronous Integrations](https://docs.datagrail.io/docs/request-manager/request-processing/overview#api-integration-details)
- [Whole Record Deletion](https://docs.datagrail.io/docs/request-manager/request-processing/overview#whole-record-deletion)
- [Access Request Lifecycle](https://docs.datagrail.io/docs/request-manager/request-processing/privacy-right/access)
- [Deletion Request Lifecycle](https://docs.datgrail.io/docs/request-manager/request-processing/privacy-right/deletion)

## Troubleshooting

If you are unable to successfully connect the integration, review these common troubleshooting steps:

- Ensure Required Permissions Are Granted on API Keys/Resources

DataGrail checks required permissions and scopes on API keys/resources used by each integration. If all necessary permissions are not granted, new connections will fail.

- Review Required Account Types and User Roles

If users do not have the necessary permissions or the minimum required user role in the connecting system, the connection to DataGrail will fail. Additionally, connections will fail if your account type does not match the one required by the integration.

See [Before You Start](https://docs.datagrail.io/docs/integrations/connection-instructions/segment_public/#before-you-start) to review these requirements.

## Technical Details

The Segment Public integration uses the [Segment Public API](https://docs.segmentapis.com/tag/Getting-Started/):

| Access Type | Asynchronous |
| Deletion Type | Asynchronous (Whole Record) |

## API Documentation

Learn more about this API implementation and DataGrail functionality in our
[API Integration Documentation](https://docs.datagrail.io/docs/integrations/api-documentation/segment_public).

Need help?  
If you have any questions, please reach out to your dedicated Account Manager or contact us at [support@datagrail.io](mailto:support@datagrail.io).

_Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material._
