> For the complete documentation index, see [llms.txt](https://docs.pandium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pandium.com/getting-started/pandium-integration-tutorial/pokemon-of-the-day-part-2/run-init-sync-on-the-tenant.md).

# Run Init Sync on the Tenant

Run an init sync on your Pandium tenant to fill its metadata with live Slack users and Pokémon types, then save settings and trigger a normal sync to test messages.

The init sync prints a standard out that lists options for both of the dynamic configurations. When it runs on Pandium those options are saved to the tenant's metadata. Let's run an init sync for the tenant and take a look at those options in the Connection Settings page!

Before you can try out your new init sync flow, you will need to put your tenant on a release based on your new code. To do that follow all the steps in [Check the Customized Connection Settings Page](/getting-started/pandium-integration-tutorial/pokemon-of-the-day-part-1/write-the-integration-in-typescript/check-the-customized-connection-settings-page.md).

Once your tenant is on that new release, you might take a look at its *Connections Settings* page. The two dynamic configs are still unsynced. This is because we haven't yet run the new init sync for this tenant; your local init runs read the tenant's metadata but don't write to it.

1. Navigate to your integration's tenant by clicking **Integrations** from the side bar > the **Unpublished** tab > the card for your *Pokémon of the Day* integration > the **Tenants** tab > the row for your tenant.

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2F2sthE9HEqt6Qr7q0J42Q%2Fimage.png?alt=media&amp;token=c98efaa5-083c-49c0-9c8a-fa223a7b5838" alt=""><figcaption></figcaption></figure>

2. Click the arrow on **Sync Now** > **Init Sync.** This will kick off an init sync for your tenant, which will appear in the *Runs* list at the bottom of the page.

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FaCNCxuLmdjBC2GMfogwG%2Fimage.png?alt=media&amp;token=48257bb0-5044-4360-85cd-0d161dc217a0" alt=""><figcaption></figcaption></figure>

If you're curious you can click the icon in the run's *Status* column. This will display the *Run Detail* page for the run. The log there should look just like the logs for the init syncs you ran locally during development.

You can navigate back to the *Tenant Detail* page by clicking the tenant's name at the top of the *Run Detail* page.

Once the init sync run has completed, click the **Details** tab and click **Show** next to *Tenant Metadata*. Alongside the `last_pokemon_id` from Part 1 you should now see the `pokemon_types` and `slack_users` lists. Pandium merged the init sync's standard out into the existing metadata rather than replacing it.

3. Click **Settings**. This will display the *Connection Settings* page for the tenant.

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FB7tysMZZO0RJgXunbN9K%2Fimage.png?alt=media&amp;token=514f3e3a-6c2c-4b29-b2f8-1b3d62b39eec" alt=""><figcaption></figcaption></figure>

The Pokémon Type and Slack User configs are no longer disabled, and their options come from the tenant's metadata.

4. Choose one of the Pokémon types fetched from the PokéAPI.
5. Choose yourself as the person who will receive the Pokémon message of the day.\
   Selecting yourself is just for development purposes.\
   When the Academy's UX admin sets up a tenant for each Pokémon trainer they will select the appropriate trainer and their requested Pokémon type.
6. Click **Save Changes.** This will close the *Connections Settings* page to display the *Tenant Detail* pag&#x65;*.*

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FzVHeRIKUJ0gWPowPY0HS%2Fimage.png?alt=media&amp;token=32ef34dd-b5a9-452f-9186-168c57d2be84" alt=""><figcaption></figcaption></figure>

7. Click the arrow on **Sync Now** > **Normal Sync.** This will kick off a normal sync for your tenant, which will appear in the *Runs* list at the bottom of the page. Before the run is complete you should get a Slack message about the Pokémon of the Day.

You may have noticed that the Pokémon in that message was just the one with the next ID, and not necessarily of the type you just selected. This is because `pokemonSync` isn't accessing these new configurations.

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FHctLXeAgSTrTU9z3OTu7%2Fimage.png?alt=media&amp;token=d1f20ba3-7547-4403-9ac5-1ef1606b1f92" alt=""><figcaption></figcaption></figure>

8. Click the icon in the run's *Status* column. This will display the *Run Detail* page for the run.

At the top of the logs you should see the tenant configs now have the new selections!

```
[index] INFO: Tenant configs: {"pokemon_type":"rock","slack_user":"<YOUR-SLACK-MEMBER-ID>"}
```

Let's update `pokemonSync` so it makes use of those new configs!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pandium.com/getting-started/pandium-integration-tutorial/pokemon-of-the-day-part-2/run-init-sync-on-the-tenant.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
