Introduction
Setup your environnement
We made a docker file that builds Panora from sources, specifically to help you locally test your contributions. Here’s how to use it.Execute these from your Panora’s repo root folder
1
Copy env variables
bash cp .env.example .env
2
Removed previously installed dependencies
rm -rf node_modules .pnpm-store ./packages/api/dist
Adding new Integrations ✨
Make sure you are insidepackages/api/src
where the server lives !
You want to add a new 3rd Party not yet supported ? 🧑🎤
Ie: Slack, Hubspot, Jira, Shopify … First choose wisely which vertical the 3rd party belongs to among these:- crm
- ticketing
- accounting
- ats
- filestorage
- hris
- marketingautomation
crm
vertical.
1. Look into the packages/shared/src/utils.ts
file and check if the provider you want to build has its metadata set inside the providersConfig
object.
It should be available (if not contact Panora team) with active field set to false meaning the integration has not been built.
Actually an integration is built in 2 parts :
- the authentication part (oauth, api key, basic etc) which is built by the Panora team
- the service integration where the mapping is created with our unified model which is what you’ll build
2. Build your provider service
You want to map a common object to your new 3rd Party ? 👩🎤
Ie: Contact, Ticket, Deal, Company … For the sake of this guide, let’s map the common objectcontact
under crm
vertical to my3rdParty (in reality it would be a real 3rd party name).
DISCLAIMER: an integration is considered valid when all common objects have been mapped. Then, after the PR is accepted we’ll be able to set active
field to true
inside providersConfig
.
1. Add a new service to map your common object to your 3rd party
Create a new service folder with the name of your 3rd party. Let’s call it my3rdParty.cd crm/contact/services/my3rdParty
You’ll now create 3 files.
index.ts
_where your service is created and direct interaction with your 3rd party API is handled
It must implement the IContactService
interface.
/crm/contacts/services
to fill the core functions.
The keen readers may have noticed 3rdPartyContactInput
and 3rdPartyContactOutput
.
This is where types.ts
comes in:
Go to the 3rd party API and insert the correct types asked by the API.
mappers.ts
you have to build the mappings between our unified common object contact
and your third party specific type 3rdPartyContact
.
It must implement IContactMapper
interface.
/crm/contacts/services
to fill the core functions.
2. Enable your new service
To make sure the service is enabled, dependencies and imports must be added. We built a script that does it in seconds.pnpm run validate-connectors --vertical="crm" --objectType="contact"
The script will automatically scan the /crm/contact/services
folder and detect any new service folder so all dependencies and imports are updated across the codebase.