# 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="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FGYjnHVLTXyGMPHaMZljO%2Fimage.png?alt=media&#x26;token=8ae8657a-7a25-47ab-88b2-887ec2436ada" 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="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FFGjmEoelEv1G6MdJoisI%2Fimage.png?alt=media&#x26;token=18fd254e-22b5-4be0-bf2d-7aa928e94316" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FjZWSfziVoSNIW5LVag8S%2Fimage.png?alt=media&#x26;token=23df3e08-d0fe-4b0e-9df4-78d6111f5cea" 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="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FBick09DKUxPgUSRTNU1j%2Fimage.png?alt=media&#x26;token=b940ef62-9f21-4b96-85a7-751ca777e525" 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="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2F7XyIv6BsfI8r7pTukAWg%2Fimage.png?alt=media&#x26;token=3bfefb6e-db74-445b-a99c-0c49affdfcb6" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2F666cctb3XI6cnO4INktY%2Fimage.png?alt=media&#x26;token=95fcffac-5412-4736-b912-46cd95535226" alt=""><figcaption></figcaption></figure>

## What's included in the code generation?

1. Your [PANDIUM.yaml, ](https://docs.pandium.com/getting-started/pandium-integration-development-kit-idk/broken-reference)which defines your custom user configuration.

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FbyO9eqboZp76k9cX87YX%2Fimage.png?alt=media&#x26;token=c2c7c36b-e6c7-4572-93ae-3cc55d583ef9" alt=""><figcaption></figcaption></figure>

2. Your custom flows logic

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FarCgyxYRG9VRPb6zBfQE%2Fimage.png?alt=media&#x26;token=ddfa6c3e-5391-4227-8f70-42d679451286" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4017407078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfJn-9R_dn6dvcGNcdk%2Fuploads%2FymRYBI6tmDFgmuRGzt0x%2Fimage.png?alt=media&#x26;token=30ab6858-aeab-484b-9ec7-3f37bb50bd4f" 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](https://docs.pandium.com/integration-hub/creating-a-tenant).&#x20;

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:&#x20;

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