# Integration Code Generator: AI Powered

AI code generation excels when treated as a specialized tool within a well-architected system. By combining constrained AI capabilities with strong engineering practices and human oversight, development teams can achieve significant acceleration in integration development while maintaining production-grade reliability. With this in mind, we've created the Pandium Integration Code Generator, using a combination of carefully crafted prompts and our API Clients. Now, with only selecting the key objects you would like mapped in your flows, you can generate a basic integration in minutes.

## How to Use the Integration Code Generator

1. [Create an internal integration](https://docs.pandium.com/~/revisions/x7Thkx1S9I9SnLbXNFwg/integration-hub/pandium-quick-start/getting-started-with-creating-an-integration) within the Pandium Integration Hub.\
   \
   \&#xNAN;*For repository branch, you can enter a new branch name, which Pandium will automatically create upon code generation.*
2. Select the 'Start Repo' button

<figure><img src="/files/1qghph4T0BRUpsI96UlB" alt=""><figcaption></figcaption></figure>

3. Review the repository path for your PANDIUM.yaml and select TypeScript as your language.\
   \
   \&#xNAN;*While TypeScript is the only language currently supported with the Integration Code Generator, more will be coming soon!*

<figure><img src="/files/bbCU3goOTrSjJskJ4oDg" alt=""><figcaption></figcaption></figure>

5. Select both "Include API Clients" & "Include CodeGen" to trigger the flow mapper.

<figure><img src="/files/iT3goSKitPdDEybefAQq" alt=""><figcaption></figcaption></figure>

5. Select the objects you would like to sync from each system for each flow. You can change the direction of the flow by toggling the middle arrow.

<figure><img src="/files/xJIaaXT1H4jWlVK5e4qD" alt=""><figcaption></figcaption></figure>

6. Select START to kick off the code generation. You will be automatically redirected to our source control page. Wait a moment for the build to kick off. You can follow along with the build process in the logs.

<figure><img src="/files/fhHs1nOsHDF7lM5ZAGTP" alt=""><figcaption></figcaption></figure>

7. Navigate to your repository and see your new code, in the branch you selected.

<figure><img src="/files/NOYnTdLy34eiFBClB5k5" alt=""><figcaption></figcaption></figure>

## What's included in the code generation?

1. Your [PANDIUM.yaml, ](broken://spaces/FLZtvq4ESMETvRuO77jh)which defines your custom user configuration.

<figure><img src="/files/0D6BRpcLn0R1CE1parEP" alt=""><figcaption></figcaption></figure>

2. Your custom flows logic

<figure><img src="/files/RK5V3WIowU7qqWVxowOL" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/w1Iyu36VpY7SBurrA6Ty" alt=""><figcaption></figcaption></figure>

3. The use of the [Pandium Clients ](https://app.gitbook.com/o/-MfEyg17bPwE_6Fs6Y-q/s/-MfJn-9R_dn6dvcGNcdk/~/changes/307/getting-started/pandium-development-kit/pandium-clients)for your selected connectors

At this point, source control will have made a release for your integration based on this code. You can use that release to [create and connect a tenant](/integration-hub/creating-a-tenant.md).

The Pandium CLI can then be used to access the secrets and configs for that tenant in local development with the command:

```
pandium local build && pandium local run [tenant-id]
```

See a demo of an integration being created between Gorgias and Iterable using the Integration Code Generator:

{% embed url="<https://youtu.be/5Lz2D2f9EhU?si=bePXM2cNtzqcFjmg>" %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pandium.com/getting-started/pandium-integration-development-kit-idk/integration-code-generator-ai-powered.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
