# Firestore

### Supported destination services&#x20;

{% hint style="info" %}
Learn more about all of our Destination service types on our [Core Concepts page](https://docs.dinmo.io/readme).
{% endhint %}

DinMo supports syncing User models (or segments) and associated fields to **Firestore Documents**.

Refer to these two documentation pages for detailed guidance on setting up an activation with your connected Firestore platform:

* [export-audiences](https://docs.dinmo.io/integrations/destination-platforms/firestore/export-audiences "mention")
* [create-and-update-collection-documents](https://docs.dinmo.io/integrations/destination-platforms/firestore/create-and-update-collection-documents "mention")

### Connect Firestore to DinMo

There are two ways to connect your Firestore integration to DinMo:

**Option 1: Direct Firestore Access**

* Recommended for teams already using Firebase or Firestore directly.
* Requires generating and uploading a JSON service account key directly from your Google Cloud Console.
* The service account must have the **Cloud Datastore User** role.

<figure><img src="https://3204318043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxzBTp1t4OfqV67nXkVse%2Fuploads%2FXgamNQBvixjk3zYDRVaY%2Fimage.png?alt=media&#x26;token=cf7356eb-5271-4a3a-bc0d-81d84bc39fee" alt=""><figcaption></figcaption></figure>

**Option 2: Access via Google Cloud Platform (GCP)**

* Suitable for teams managing Firestore through a broader GCP setup.
* Requires generating and uploading a JSON service account key from your GCP console.
* The service account must have the **Cloud Datastore User** role.

Follow these steps to successfully connect your Firestore platform to DinMo:

**1. Prerequisites**

Ensure you have appropriate permissions in your Google Cloud Platform (GCP) project.

* Log in to your [Google Cloud Console](https://console.cloud.google.com/).
* Navigate to **IAM & Admin > Service Accounts**.
* Verify you have permission to create or manage service accounts with the role **Cloud Datastore User**.
* If you lack the required permissions, contact your GCP admin.

**2. Set Up Firestore and Generate Credentials**

* In your GCP console, navigate to **Firestore** and ensure your database is running in **Native mode**.
* Collect the **database name** and the **documents collection** that you want DinMo to use for your activations.
*

```
<figure><img src="https://3204318043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxzBTp1t4OfqV67nXkVse%2Fuploads%2FXlt9H6RfIkZpFRHqVfEc%2Fimage.png?alt=media&#x26;token=9228b3a2-1242-4807-a583-bed028735ee3" alt=""><figcaption></figcaption></figure>
```

* Navigate to **IAM & Admin > Service Accounts**.
* Select an existing service account or create a new one with Firestore permissions.
* Click on the service account, navigate to the **Keys** tab, and generate a new JSON key.
* Download the generated JSON key file and store it securely.

**3. Connect Firestore as a Platform in DinMo**

* In DinMo, navigate to the **Destinations** section from the navigation bar.
* Click "Add a new destination".
* Select "Connect a new platform" and choose **Firestore**.
* Enter a recognizable name for your platform connection.
* Upload the JSON key file you downloaded from your GCP account.
* Enter your Firestore Project ID and (optionally) specify the database name if not using the default.
* Save the connection.

Your Firestore platform is now connected to DinMo!

To proceed, refer to the dedicated destination options to initiate your first Firestore activation.
