diff --git a/docs/core-concepts/custom-fields.mdx b/docs/core-concepts/custom-fields.mdx
index 729f6a81a..f57c0c8f4 100644
--- a/docs/core-concepts/custom-fields.mdx
+++ b/docs/core-concepts/custom-fields.mdx
@@ -11,7 +11,17 @@ Creating a `Field Mapping` involves two majors actions:
- Defining a custom field on Panora's side
- Mapping it to a field from your customer's software.
-_insert video_
+In this video we define a field and then once a connection is available we fetch fields inside your user's software so you can map the custom field with Panora.
+
+
+
+
+
+## Create a custom field mapping using the our UI dashboard
@@ -20,23 +30,55 @@ _insert video_
- Click `Add Field Mapping`. Select a unified object you want to extend, and give your custom field a slug and a friendly name. You also need to select a data type.
+ Click `Define a custom field`. Select a unified object you want to extend, and give your custom field a slug and a friendly name. You also need to select a data type.
-Now, move to the `Map Fields` section. To finish the mapping, select the custom field you just created, and fill the fields `Provider` and Linked User ID.
+Now, click on the `Map a custom field` button. To finish the mapping, select the custom field you just created, and fill the fields `Provider` and `Linked User Id`.
-You will now find all the fields your user has in its software. Pick the one that you want to map to.
+You will now find all the fields your user has in its software. Pick the one that you want to map to. Click `Map`.
+## Create a custom field mapping using our API
+
+The following example creates a custom field mapping in two steps (**define and map**) where we map a remote field called `hair_color_hubspot_123_id` (existing in the `Husbpot` provider) and mapping it to the `crm.contact` unified model of Panora under the name of `hair_color`.
+
+
+ ```shell Define custom field
+ curl --request POST \
+ --url https://api.panora.dev/field-mappings/define \
+ --header 'Authorization: Bearer ' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "object_type_owner": "crm.contact",
+ "name": "hair_color",
+ "description": "My hair_color field mapping",
+ "data_type": "text"
+ }'
+ ```
+
+ ```shell Map custom field
+ curl --request POST \
+ --url https://api.panora.dev/field-mappings/map \
+ --header 'Authorization: Bearer ' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "attributeId": "id_defined_field", # retrieve that from response of the /define request
+ "source_custom_field_id": "hair_color_hubspot_123_id", # id of the remote field inside the remote provider
+ "source_provider": "hubspot",
+ "linked_user_id": "acme_customer_a"
+ }'
+ ```
+
+
[✏️ Suggest an update](https://tally.so/r/mRD1QQ?feedback_source=custom_fields)
[Need help? Come chat on Discord!](https://discord.gg/G7fr4HNyTb)
diff --git a/docs/core-concepts/magic-links.mdx b/docs/core-concepts/magic-links.mdx
index d97187999..4aff89193 100644
--- a/docs/core-concepts/magic-links.mdx
+++ b/docs/core-concepts/magic-links.mdx
@@ -5,11 +5,11 @@ icon: "wand-magic-sparkles"
---
-
+
## Send your first Magic Link
@@ -18,14 +18,19 @@ icon: "wand-magic-sparkles"
Login to your [account dashboard](https://dashboard.panora.dev)
-Go to the _Connections_ [section](https://dashboard.panora.dev/connections) and click button `Create a Magic Link`
+
+ Go to the _Connections_ [section](https://dashboard.panora.dev/connections)
+ and click button `Create a Magic Link`
+
Click `Create a Unique Magic Link`
You'll be asked for two informations: an `Origin User Email` and an `Origin
User Identifier`. The `Origin User Identifier` is the id of the user you're
- inviting, as represented in your systems.
+ inviting, as represented in your systems. If you already have created a
+ [Linked User](/recipes/import-existing-users) you have the option to select
+ it.
Click `Generate`
diff --git a/docs/images/apikeys.mp4 b/docs/images/apikeys.mp4
new file mode 100644
index 000000000..c22c817d3
Binary files /dev/null and b/docs/images/apikeys.mp4 differ
diff --git a/docs/images/customcreds.mp4 b/docs/images/customcreds.mp4
new file mode 100644
index 000000000..ae39278df
Binary files /dev/null and b/docs/images/customcreds.mp4 differ
diff --git a/docs/images/definefields.mp4 b/docs/images/definefields.mp4
new file mode 100644
index 000000000..c6ac20cc2
Binary files /dev/null and b/docs/images/definefields.mp4 differ
diff --git a/docs/images/linkedusers.mp4 b/docs/images/linkedusers.mp4
new file mode 100644
index 000000000..152964a14
Binary files /dev/null and b/docs/images/linkedusers.mp4 differ
diff --git a/docs/images/magiclinks.mp4 b/docs/images/magiclinks.mp4
new file mode 100644
index 000000000..e7ad4a4ef
Binary files /dev/null and b/docs/images/magiclinks.mp4 differ
diff --git a/docs/images/webhooks.mp4 b/docs/images/webhooks.mp4
index f4ddf5d87..e4127cc89 100644
Binary files a/docs/images/webhooks.mp4 and b/docs/images/webhooks.mp4 differ
diff --git a/docs/mint.json b/docs/mint.json
index b59cc75e9..b87880499 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -405,7 +405,6 @@
{
"group": "Recipes",
"pages": [
- "recipes/share-magic-link",
"recipes/embed-catalog",
"recipes/import-existing-users",
"recipes/catch-connection-token",
diff --git a/docs/quick-start.mdx b/docs/quick-start.mdx
index 52e4f08e6..40cb9196b 100644
--- a/docs/quick-start.mdx
+++ b/docs/quick-start.mdx
@@ -14,7 +14,7 @@ Before you begin, make sure you have the following:
## **Step 1: Get access to your users data**
-You either have the option to use a **no-code magic link** or the **embedded frontend snippet** to get access to your user's data.
+You either have the option to use a [**no-code magic link**](/core-concepts/magic-links) or the [**embedded frontend snippet**](/recipes/embed-catalog) to get access to your user's data.
Choose the one that fits your needs !
@@ -38,7 +38,8 @@ Choose the one that fits your needs !
You'll be asked for two informations: an `Origin User Email` (of the user
you're creating the link for) and an `Origin User Identifier`. The `Origin
User Identifier` is the id of the user you're inviting, as represented in your
- sofwtare.
+ sofwtare. If you already have created a [Linked User](/recipes/import-existing-users) you have the option to select
+ it.
Click `Generate`
@@ -65,22 +66,36 @@ Choose the one that fits your needs !
```javascript React
import "@panora/embedded-card-react/dist/index.css";
import PanoraProviderCard from "@panora/embedded-card-react";
+ import PanoraDynamicCatalog from "@panora/embedded-card-react";
```
-
+
+ You can either import a single connector card or a catalog of all connectors that you select in the UI dashboard configuration (see [here](//recipes/embed-catalog) for more details).
+ In order to fill the `linkedUserId` prop, use your own remote id that exist in your system **OR** check this [recipe](/recipes/import-existing-users) !
- ```javascript React
+ ```javascript Single Connector Card
+ ```
+ ```javascript Whole Connector Catalog
+
```
+ You should see a card or catalog being rendered client-side !
+
+ __insert photo__
diff --git a/docs/recipes/add-custom-provider-creds.mdx b/docs/recipes/add-custom-provider-creds.mdx
index 812ab95f3..7409f8a45 100644
--- a/docs/recipes/add-custom-provider-creds.mdx
+++ b/docs/recipes/add-custom-provider-creds.mdx
@@ -14,5 +14,9 @@ icon: "gear-code"
Visit the _Manage Connectors_ [section](https://dashboard.panora.dev/configuration), choose the connector you wish to add credentials for and add your own credentials.
-
+
diff --git a/docs/recipes/import-existing-users.mdx b/docs/recipes/import-existing-users.mdx
index 79900675a..b9c7284b4 100644
--- a/docs/recipes/import-existing-users.mdx
+++ b/docs/recipes/import-existing-users.mdx
@@ -2,4 +2,79 @@
title: "Import Your Existing Users"
description: ""
icon: "users"
----
\ No newline at end of file
+---
+
+## Using the UI
+
+#### You can add a single linked user
+
+
+
+
+
+#### You can add a batch of linked users by using the drag n drop tool
+
+
+
+
+
+## Using our API
+
+This code adds a single/batch of linked accounts inside Panora. It helps us have an exact mapping of your existing users insdie our system.
+
+
+ ```shell Import a single existing user
+ curl --request POST \
+ --url https://api.panora.dev/linked-users \
+ --header 'Authorization: Bearer ' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "linked_user_origin_id": "acme_user_1", # your remote id (id representing your existing user inside your system)
+ "alias": "acme", # your company name
+ "id_project": "ikloqqkq90-djsddhjs-prs12dj",
+ }'
+ ```
+ ```shell Import a batch of existing users
+ curl --request POST \
+ --url https://api.panora.dev/linked-users/batch \
+ --header 'Authorization: Bearer ' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "linked_user_origin_ids": ["acme_user_1", "acme_user_2", "acme_user_3"], # array of remote ids (ids representing your existing users inside your system)
+ "alias": "acme", # your company name
+ "id_project": "ikloqqkq90-djsddhjs-prs12dj",
+ }'
+ ```
+
+
+# How to fetch linked users
+
+You must know how to fetch linked users as you'll have to use them in the UI widget prop.
+
+## Fetch using our library functions
+
+At any point in your code, if you have successfully added your linked users (see above) you'll be able to fetch them by calling :
+
+- `linkedUserFromRemoteId(remote_id: string)` where `remote_id` is the id of the user inside your system and this function returns a [LinkedUser object](/glossary/linked-account-object).
+- `fetchLinkedUsers()` where this function returns an array of [LinkedUser objects](/glossary/linked-account-object) for your projectId.
+
+
+ ```shell linkedUserFromRemoteId
+ curl --request GET \
+ --url https://api.panora.dev/linked-users/fromRemoteId?remoteId=acme_id_1 \
+ --header 'Authorization: Bearer ' \
+ ```
+ ```shell fetchLinkedUsers
+ curl --request GET \
+ --url https://api.panora.dev/linked-users \
+ --header 'Authorization: Bearer ' \
+ ```
+
diff --git a/docs/recipes/share-magic-link.mdx b/docs/recipes/share-magic-link.mdx
deleted file mode 100644
index 8d10a87b6..000000000
--- a/docs/recipes/share-magic-link.mdx
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: "Share A Magic Link"
-description: "Use Magic Links to invite your users to grant you access to their data without a dedicated website. Create a full connection flow in just a few clicks. **No code required.**"
-icon: "wand-magic-sparkles"
----
\ No newline at end of file
diff --git a/packages/api/src/@core/linked-users/linked-users.controller.ts b/packages/api/src/@core/linked-users/linked-users.controller.ts
index 7c65c6b22..9f8cb13d0 100644
--- a/packages/api/src/@core/linked-users/linked-users.controller.ts
+++ b/packages/api/src/@core/linked-users/linked-users.controller.ts
@@ -54,13 +54,13 @@ export class LinkedUsersController {
}
@ApiOperation({
- operationId: 'getLinkedUsers',
+ operationId: 'fetchLinkedUsers',
summary: 'Retrieve Linked Users',
})
@ApiResponse({ status: 200 })
@UseGuards(JwtAuthGuard)
@Get()
- getLinkedUsers(@Request() req: any) {
+ fetchLinkedUsers(@Request() req: any) {
const { id_project } = req.user;
return this.linkedUsersService.getLinkedUsers(id_project);
}
@@ -79,14 +79,14 @@ export class LinkedUsersController {
}
@ApiOperation({
- operationId: 'getLinkedUser',
- summary: 'Retrieve a Linked User',
+ operationId: 'linkedUserFromRemoteId',
+ summary: 'Retrieve a Linked User From A Remote Id',
})
- @ApiQuery({ name: 'originId', required: true, type: String })
+ @ApiQuery({ name: 'remoteId', required: true, type: String })
@ApiResponse({ status: 200 })
//@UseGuards(JwtAuthGuard)
- @Get('single')
- getLinkedUserV2(@Query('originId') id: string) {
+ @Get('fromRemoteId')
+ linkedUserFromRemoteId(@Query('remoteId') id: string) {
// validate project_id against user
return this.linkedUsersService.getLinkedUserV2(id);
}
diff --git a/packages/api/swagger/swagger-spec.json b/packages/api/swagger/swagger-spec.json
index 5e1456392..8dcd78db8 100644
--- a/packages/api/swagger/swagger-spec.json
+++ b/packages/api/swagger/swagger-spec.json
@@ -502,7 +502,7 @@
]
},
"get": {
- "operationId": "getLinkedUsers",
+ "operationId": "fetchLinkedUsers",
"summary": "Retrieve Linked Users",
"parameters": [],
"responses": {
@@ -546,7 +546,31 @@
"summary": "Retrieve a Linked User",
"parameters": [
{
- "name": "originId",
+ "name": "id",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ }
+ },
+ "tags": [
+ "linked-users"
+ ]
+ }
+ },
+ "/linked-users/fromRemoteId": {
+ "get": {
+ "operationId": "linkedUserFromRemoteId",
+ "summary": "Retrieve a Linked User From A Remote Id",
+ "parameters": [
+ {
+ "name": "remoteId",
"required": true,
"in": "query",
"schema": {