From 8380d25deb111671cc74f1550df3683eb18c036b Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Wed, 2 Apr 2025 14:22:40 +0530 Subject: [PATCH 01/24] Update identify-web-user.mdx no-work-item --- fern/docs/pages/plug-sdk/identify-web-user.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fern/docs/pages/plug-sdk/identify-web-user.mdx b/fern/docs/pages/plug-sdk/identify-web-user.mdx index 22ab62cb..f0ead5c5 100644 --- a/fern/docs/pages/plug-sdk/identify-web-user.mdx +++ b/fern/docs/pages/plug-sdk/identify-web-user.mdx @@ -86,7 +86,7 @@ If you prefer a two-level structure, where users are directly associated with an |`user_ref` |A unique user reference that the DevRev app uses for identifying your users. This parameter is required. |string | |`email` |The email address of the customer. It's used for sending email notifications of any support messages. |string | |`display_name` |The name of the user that's shown on the widget. |string | -|`phone_numbers` |The mobile number of the customer. |array | +|`phone_numbers` |The customer's mobile number, which must adhere to the E.164 format. |array | **Attributes for workspaces** @@ -102,7 +102,7 @@ If you prefer a two-level structure, where users are directly associated with an |`account_ref` |A unique reference for the account. |string | |`display_name` | The name of the account that's shown on the widget. |string | |`domains` |The domain names of the accounts that the users belongs to. |array | -| `phone_numbers` |The phone number associated with the account. |array | +|`phone_numbers` |The phone number associated with the account must be in E.164 format. |array | ## Pass the session token From 1cc90b3e392efbdb2283ac00d9477255525c791b Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Tue, 8 Apr 2025 11:00:21 +0530 Subject: [PATCH 02/24] Update identify-web-user.mdx --- .../docs/pages/plug-sdk/identify-web-user.mdx | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/fern/docs/pages/plug-sdk/identify-web-user.mdx b/fern/docs/pages/plug-sdk/identify-web-user.mdx index f0ead5c5..606527ad 100644 --- a/fern/docs/pages/plug-sdk/identify-web-user.mdx +++ b/fern/docs/pages/plug-sdk/identify-web-user.mdx @@ -81,28 +81,30 @@ If you prefer a two-level structure, where users are directly associated with an **Attributes for users** -|Attributes |Description |Type | +|Attributes |Description |Type | Required | Unique | |---|---|---| -|`user_ref` |A unique user reference that the DevRev app uses for identifying your users. This parameter is required. |string | -|`email` |The email address of the customer. It's used for sending email notifications of any support messages. |string | -|`display_name` |The name of the user that's shown on the widget. |string | -|`phone_numbers` |The customer's mobile number, which must adhere to the E.164 format. |array | +|`user_ref` |A unique user reference that the DevRev app uses for identifying your users. This parameter is required. |string |✅ |- | +|`email` |The email address of the customer. It's used for sending email notifications of any support messages. |string |❌ |- | +|`display_name` |The name of the user that's shown on the widget. |string |❌ |- | +|`phone_numbers` |The customer's mobile number, which must adhere to the E.164 format. |array |❌ * |- | + +* If nothing is specified, a system-generated name will be assigned to the user. **Attributes for workspaces** -|Attributes |Description |Type | +|Attributes |Description |Type | Required | Unique | |---|---|---| -|`workspace_ref` |A unique reference for the user's workspace. If not provided, and an account reference is passed, the user is directly attached to the account. |string | -|`display_name` |The name of the workspace that's shown on the widget. |string | +|`workspace_ref` |A unique reference for the user's workspace. If not provided, and an account reference is passed, the user is directly attached to the account. |string |❌ |- | +|`display_name` |The name of the workspace that's shown on the widget. |string |- |✅ | **Attributes for accounts** -|Attributes |Description |Type | +|Attributes |Description |Type | Required | Unique | |---|---|---| -|`account_ref` |A unique reference for the account. |string | -|`display_name` | The name of the account that's shown on the widget. |string | -|`domains` |The domain names of the accounts that the users belongs to. |array | -|`phone_numbers` |The phone number associated with the account must be in E.164 format. |array | +|`account_ref` |A unique reference for the account. |string | ❌ |- | +|`display_name` | The name of the account that's shown on the widget. |string |- |✅ | +|`domains` |The domain names of the accounts that the users belongs to. |array |- |✅ | +|`phone_numbers` |The phone number associated with the account must be in E.164 format. |array |- |- | ## Pass the session token From 8cc62a7aeebce45f0674cb3cf6d6af69bb190599 Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Tue, 8 Apr 2025 11:18:34 +0530 Subject: [PATCH 03/24] Update identify-web-user.mdx --- .../docs/pages/plug-sdk/identify-web-user.mdx | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/fern/docs/pages/plug-sdk/identify-web-user.mdx b/fern/docs/pages/plug-sdk/identify-web-user.mdx index 606527ad..023ec6b0 100644 --- a/fern/docs/pages/plug-sdk/identify-web-user.mdx +++ b/fern/docs/pages/plug-sdk/identify-web-user.mdx @@ -79,33 +79,32 @@ You can pass custom traits, as shown above, not only for `users` but also for `w If you prefer a two-level structure, where users are directly associated with an account instead of a workspace, you can provide the `user_ref` and details along with the `account_ref` and details. -**Attributes for users** +**Attributes for [users](https://developer.devrev.ai/public/api-reference/dev-users/product-builders-and-service-providers)** -|Attributes |Description |Type | Required | Unique | -|---|---|---| -|`user_ref` |A unique user reference that the DevRev app uses for identifying your users. This parameter is required. |string |✅ |- | -|`email` |The email address of the customer. It's used for sending email notifications of any support messages. |string |❌ |- | -|`display_name` |The name of the user that's shown on the widget. |string |❌ |- | -|`phone_numbers` |The customer's mobile number, which must adhere to the E.164 format. |array |❌ * |- | +| Attributes | Description | Type | Required | Unique | +|---------------|-----------------------------------------------------------------------------|--------|----------|--------| +| user_ref | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | Yes | +| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | No | +| display_name | The name of the user that's shown on the widget. | string | ❌ | No | +| phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ * | No | * If nothing is specified, a system-generated name will be assigned to the user. -**Attributes for workspaces** +**Attributes for [workspaces](https://developer.devrev.ai/public/api-reference/rev-orgs/workspaces)** -|Attributes |Description |Type | Required | Unique | -|---|---|---| -|`workspace_ref` |A unique reference for the user's workspace. If not provided, and an account reference is passed, the user is directly attached to the account. |string |❌ |- | -|`display_name` |The name of the workspace that's shown on the widget. |string |- |✅ | +| Attributes | Description | Type | Required | Unique | +|-----------------|--------------------------------------------------------------------------------------------------------------------|--------|----------|--------| +| `workspace_ref` | A unique reference for the user's workspace. If not provided, and an account reference is passed, the user is directly attached to the account. | string | ❌ | - | +| `display_name` | The name of the workspace that's shown on the widget. | string | - | ✅ | -**Attributes for accounts** - -|Attributes |Description |Type | Required | Unique | -|---|---|---| -|`account_ref` |A unique reference for the account. |string | ❌ |- | -|`display_name` | The name of the account that's shown on the widget. |string |- |✅ | -|`domains` |The domain names of the accounts that the users belongs to. |array |- |✅ | -|`phone_numbers` |The phone number associated with the account must be in E.164 format. |array |- |- | +**Attributes for [accounts](https://developer.devrev.ai/public/api-reference/accounts/accounts)** +| Attributes | Description | Type | Required | Unique | +|-----------------|-------------------------------------------------------------------------------------------------------------------|--------|----------|--------| +| `account_ref` | A unique reference for the account. | string | ❌ | - | +| `display_name` | The name of the account that's shown on the widget. | string | - | ✅ | +| `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | - | ✅ | +| `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | - | - | ## Pass the session token While initializing the PLuG widget you pass the session token for DevRev to identify this user and thereby make the widget more customized for the user and their context. From 6132d27bcfbbe78e7563f534f1511a3ab206c228 Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Tue, 8 Apr 2025 11:26:52 +0530 Subject: [PATCH 04/24] Update identify-web-user.mdx --- .../docs/pages/plug-sdk/identify-web-user.mdx | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/fern/docs/pages/plug-sdk/identify-web-user.mdx b/fern/docs/pages/plug-sdk/identify-web-user.mdx index 023ec6b0..562c4b27 100644 --- a/fern/docs/pages/plug-sdk/identify-web-user.mdx +++ b/fern/docs/pages/plug-sdk/identify-web-user.mdx @@ -105,6 +105,35 @@ If you prefer a two-level structure, where users are directly associated with an | `display_name` | The name of the account that's shown on the widget. | string | - | ✅ | | `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | - | ✅ | | `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | - | - | + + +### How resolution works + +In a DevOrg, we utilize unique identifiers to handle objects. If an object doesn't exist, we create it and then attempt to link it. For example, here's how it operates: + +User reference: +- A user reference is mandatory, ensuring its constant presence. +- If a user with the provided reference doesn't exist, the system automatically creates the user. + +This approach ensures efficient management and integration of objects within the DevOrg. + +| Workspace Ref | Account Ref | Results | +|---------------|-------------|------------------------------------------------------------------------------------------------------| +| ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both. | +| | | If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both. | +| | | If workspace exists under different account: System returns an error, as workspaces cannot be moved between accounts. | +| ✅ | ❌ | If workspace doesn’t exist: System creates a new account and workspace (if needed). User is linked to both. | +| ❌ | ✅ | If the account doesn’t exist: An account is created, and the user is linked with the account. | +| ❌ | ❌ | No action on account or workspace. The user is returned. | + + + +### Best practices + +- Ensure the email field is filled out. This helps the support team accurately identify users and prevents duplicate entries when integrating with systems like email integration or outreach. +- If only an account and user are needed, you can omit workspace traits. This strategy helps prevent duplicate conflicts at the workspace level and maintains a clear object hierarchy. +- Ensure that unique attributes and reference identifiers (Refs) are aligned to avoid conflicts. + ## Pass the session token While initializing the PLuG widget you pass the session token for DevRev to identify this user and thereby make the widget more customized for the user and their context. From 906f16e50d498ba5c7b4d264227de9dc30e0fb55 Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:03:21 +0530 Subject: [PATCH 05/24] Update identify-web-user.mdx --- fern/docs/pages/plug-sdk/identify-web-user.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fern/docs/pages/plug-sdk/identify-web-user.mdx b/fern/docs/pages/plug-sdk/identify-web-user.mdx index 562c4b27..9e88b4ab 100644 --- a/fern/docs/pages/plug-sdk/identify-web-user.mdx +++ b/fern/docs/pages/plug-sdk/identify-web-user.mdx @@ -84,7 +84,7 @@ If you prefer a two-level structure, where users are directly associated with an | Attributes | Description | Type | Required | Unique | |---------------|-----------------------------------------------------------------------------|--------|----------|--------| | user_ref | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | Yes | -| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | No | +| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | Yes | | display_name | The name of the user that's shown on the widget. | string | ❌ | No | | phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ * | No | @@ -94,17 +94,17 @@ If you prefer a two-level structure, where users are directly associated with an | Attributes | Description | Type | Required | Unique | |-----------------|--------------------------------------------------------------------------------------------------------------------|--------|----------|--------| -| `workspace_ref` | A unique reference for the user's workspace. If not provided, and an account reference is passed, the user is directly attached to the account. | string | ❌ | - | -| `display_name` | The name of the workspace that's shown on the widget. | string | - | ✅ | +| `workspace_ref` | A unique reference for the user's workspace. If not provided, and an account reference is passed, the user is directly attached to the account. | string | ❌ | ✅ | +| `display_name` | The name of the workspace that's shown on the widget. | string | ❌ | ✅ | **Attributes for [accounts](https://developer.devrev.ai/public/api-reference/accounts/accounts)** | Attributes | Description | Type | Required | Unique | |-----------------|-------------------------------------------------------------------------------------------------------------------|--------|----------|--------| -| `account_ref` | A unique reference for the account. | string | ❌ | - | -| `display_name` | The name of the account that's shown on the widget. | string | - | ✅ | -| `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | - | ✅ | -| `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | - | - | +| `account_ref` | A unique reference for the account. | string | ❌ | ✅ | +| `display_name` | The name of the account that's shown on the widget. | string | ❌ | ✅ | +| `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | ❌ | ✅ | +| `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | - | ### How resolution works From e5ddb8a23dc1c9b24076606d4efd5d3da90fede4 Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:20:39 +0530 Subject: [PATCH 06/24] Update user-identity.mdx --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 9e88b4ab..0573d373 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -83,10 +83,10 @@ If you prefer a two-level structure, where users are directly associated with an | Attributes | Description | Type | Required | Unique | |---------------|-----------------------------------------------------------------------------|--------|----------|--------| -| user_ref | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | Yes | -| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | Yes | -| display_name | The name of the user that's shown on the widget. | string | ❌ | No | -| phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ * | No | +| user_ref | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | ✅ | +| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | ✅ | +| display_name | The name of the user that's shown on the widget. | string | ❌ | ❌ | +| phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ * | ❌ | * If nothing is specified, a system-generated name will be assigned to the user. @@ -104,7 +104,7 @@ If you prefer a two-level structure, where users are directly associated with an | `account_ref` | A unique reference for the account. | string | ❌ | ✅ | | `display_name` | The name of the account that's shown on the widget. | string | ❌ | ✅ | | `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | ❌ | ✅ | -| `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | - | +| `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | ❌ | ### How resolution works From d3ba331f972c5183128b033f6ebff0dd57f20356 Mon Sep 17 00:00:00 2001 From: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> Date: Thu, 10 Apr 2025 11:47:10 +0530 Subject: [PATCH 07/24] Update user-identity.mdx --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 0573d373..bd8f77ed 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -107,6 +107,16 @@ If you prefer a two-level structure, where users are directly associated with an | `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | ❌ | + +| Status code| Description | +|----------|----------| +| | | +| | | +| | | +| | | +| | | +| | | + ### How resolution works In a DevOrg, we utilize unique identifiers to handle objects. If an object doesn't exist, we create it and then attempt to link it. For example, here's how it operates: From 11f2846c8cf5f6215848ea789640137aa4e9b6d9 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Thu, 10 Apr 2025 19:20:25 +0530 Subject: [PATCH 08/24] update documentation --- .../docs/pages/plug-sdk/web/user-identity.mdx | 63 ++++++++++--------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index bd8f77ed..dfbb8863 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -62,21 +62,6 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ Ensure that you follow the specified format when providing your phone number. -## Pass custom attributes - -To create custom attributes, see [Object customization](https://devrev.ai/docs/product/object-customization). - -You can pass the custom attributes that are created as shown below: -```json - -"custom_fields": { - "tnt__custom_attribute_name1": , - "tnt__custom_attribute_name2": , -} - ``` - -You can pass custom traits, as shown above, not only for `users` but also for `workspaces` and `accounts`. - If you prefer a two-level structure, where users are directly associated with an account instead of a workspace, you can provide the `user_ref` and details along with the `account_ref` and details. **Attributes for [users](https://developer.devrev.ai/public/api-reference/dev-users/product-builders-and-service-providers)** @@ -84,11 +69,12 @@ If you prefer a two-level structure, where users are directly associated with an | Attributes | Description | Type | Required | Unique | |---------------|-----------------------------------------------------------------------------|--------|----------|--------| | user_ref | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | ✅ | -| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | ✅ | -| display_name | The name of the user that's shown on the widget. | string | ❌ | ❌ | -| phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ * | ❌ | +| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | ✅** | +| display_name | The name of the user that's shown on the widget. | string | ❌* | ❌ | +| phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ | ❌ | * If nothing is specified, a system-generated name will be assigned to the user. +** Email uniqueness is subjected to organization preferences. If organization want, it can be marked non unique. But it is not recommended. **Attributes for [workspaces](https://developer.devrev.ai/public/api-reference/rev-orgs/workspaces)** @@ -106,16 +92,32 @@ If you prefer a two-level structure, where users are directly associated with an | `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | ❌ | ✅ | | `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | ❌ | +## Pass custom attributes +To create custom attributes, see [Object customization](https://devrev.ai/docs/product/object-customization). + +You can pass the custom attributes that are created as shown below: +```json -| Status code| Description | +"custom_fields": { + "tnt__custom_attribute_name1": , + "tnt__custom_attribute_name2": , +} + ``` + +You can pass custom traits, as shown above, not only for `users` but also for `workspaces` and `accounts`. + +### API Status codes and troubleshooting + +| Status code| Description & Troubleshooting | |----------|----------| -| | | -| | | -| | | -| | | -| | | -| | | +| 200 OK | The request was successful and the session token would be returned in the response. No troubleshooting required. | +| 400 Bad Request | The request was invalid. Check the request body for errors. For fields like domain and phone number, check on their format. | +| 401 Unauthorized | The request was unauthorized. Check if the AAT is valid and not expired. | +| 403 Forbidden | The request was forbidden. Check the authorization header for errors and make sure the token is a valid AAT. | +| 404 Not Found | The requested resource could not be found. Verify the endpoint URL is correct. | +| 429 Too Many Requests | Rate limit exceeded. Implement request throttling or wait before retrying. | +| 500 Internal Server Error | Server encounteres an unexpected error. Wait and try again later. If the issue persists, contact support with the request details and timestamp. | ### How resolution works @@ -129,19 +131,20 @@ This approach ensures efficient management and integration of objects within the | Workspace Ref | Account Ref | Results | |---------------|-------------|------------------------------------------------------------------------------------------------------| +| ❌ | ✅ | (Most common Usage) \nIf the account doesn’t exist: An account is created, and the user is linked with the account. | +| ❌ | ❌ | No action on account or workspace. The user is returned. | | ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both. | | | | If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both. | -| | | If workspace exists under different account: System returns an error, as workspaces cannot be moved between accounts. | +| | | If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | | ✅ | ❌ | If workspace doesn’t exist: System creates a new account and workspace (if needed). User is linked to both. | -| ❌ | ✅ | If the account doesn’t exist: An account is created, and the user is linked with the account. | -| ❌ | ❌ | No action on account or workspace. The user is returned. | ### Best practices -- Ensure the email field is filled out. This helps the support team accurately identify users and prevents duplicate entries when integrating with systems like email integration or outreach. -- If only an account and user are needed, you can omit workspace traits. This strategy helps prevent duplicate conflicts at the workspace level and maintains a clear object hierarchy. +- For B2C companies, we recommend to populate only the user ref and no workspace or account ref. +- For B2B companies, we recommend to populate user ref alongside account ref. Workspace ref and traits are optional and are recommended to not be populated if workspace modelling actually makes sense for the companies and we have a unique identifier to resolve them. +- Identifiers like email address and display name are recommended to be populated in the user traits so the resultant user is identifiable and also to avoid creating duplicates from other integrations like email integration or outreach. - Ensure that unique attributes and reference identifiers (Refs) are aligned to avoid conflicts. ## Pass the session token From e9d872d77ff7257c5379b4ae06d87d39bd28ef7e Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Thu, 10 Apr 2025 20:03:29 +0530 Subject: [PATCH 09/24] final changes --- .../docs/pages/plug-sdk/web/user-identity.mdx | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index dfbb8863..9b57d892 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -1,10 +1,8 @@ Once you have [installed PLuG](./installation), all your users who interact with the widget are created as anonymous users in the DevRev app with a random name since there is no information about the user. -For users who are logged into your website, you can identify them in PLuG so they can view their past conversations. Identifying your users also enables more personalized engagement. +For users who are logged into your website, you can identify them in PLuG to enable them to view their conversation history and receive more personalized engagement. -In this flow, you have to generate a session token for every user who visits your website. The session token identifies the customer when they interact with the widget. The session token is generated using the application access token and customer information. It should be generated on your website's back end since the app token needs to be kept hidden. - -To identify logged-in users, follow these steps: +To implement user identification, you'll need to generate a session token for each user who visits your website. This token is created using your application access token combined with customer information, and must be generated on your backend to keep the application token secure. ## Generate an application access token @@ -18,7 +16,7 @@ Ensure you copy your access token, as you will not be able to view it again. ## Generate a session token -For security reasons, this call should be made from the server side so that your AAT isn't exposed. +For security reasons, this API call must be made from your server side to prevent exposing your Application Access Token (AAT). Using the `rev_info` method, you can generate and recognize a user within the DevRev system by providing relevant user details. This method enables you to convey information systematically, ensuring alignment between your DevRev CRM and the structured data model. For information regarding terminologies, click [here](https://devrev.ai/docs/product/grow). @@ -35,7 +33,7 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ "workspace_ref": "devrev-dev", "user_traits": { "email": "test-user@devrev.ai", - "display_name": "Devrev Test USer", + "display_name": "Devrev Test User", "phone_numbers": ["+911122334455"], "custom_fields": { "tnt__": "value 1" @@ -58,12 +56,6 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ }' ``` - -Ensure that you follow the specified format when providing your phone number. - - -If you prefer a two-level structure, where users are directly associated with an account instead of a workspace, you can provide the `user_ref` and details along with the `account_ref` and details. - **Attributes for [users](https://developer.devrev.ai/public/api-reference/dev-users/product-builders-and-service-providers)** | Attributes | Description | Type | Required | Unique | @@ -92,6 +84,10 @@ If you prefer a two-level structure, where users are directly associated with an | `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | ❌ | ✅ | | `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | ❌ | + +Ensure that you follow the specified format when populating phone numbers and domains in the request body. + + ## Pass custom attributes To create custom attributes, see [Object customization](https://devrev.ai/docs/product/object-customization). @@ -117,10 +113,24 @@ You can pass custom traits, as shown above, not only for `users` but also for `w | 403 Forbidden | The request was forbidden. Check the authorization header for errors and make sure the token is a valid AAT. | | 404 Not Found | The requested resource could not be found. Verify the endpoint URL is correct. | | 429 Too Many Requests | Rate limit exceeded. Implement request throttling or wait before retrying. | -| 500 Internal Server Error | Server encounteres an unexpected error. Wait and try again later. If the issue persists, contact support with the request details and timestamp. | +| 500 Internal Server Error | Server encounters an unexpected error. Wait and try again later. If the issue persists, contact support with the request details and timestamp. | ### How resolution works +DevRev offers three ways to structure your customer's data: +1. **Single-level (Recommended for most B2C cases)** + - User + - What to include: Only user information + +2. **Two-level (Recommended for most B2B cases)** + - User → Account + - What to include: User and account information + +3. **Three-level** + - User → Workspace → Account + - What to include: User, workspace and account information + - Only use workspace information if your business model requires workspace organization + In a DevOrg, we utilize unique identifiers to handle objects. If an object doesn't exist, we create it and then attempt to link it. For example, here's how it operates: User reference: @@ -142,10 +152,12 @@ This approach ensures efficient management and integration of objects within the ### Best practices -- For B2C companies, we recommend to populate only the user ref and no workspace or account ref. -- For B2B companies, we recommend to populate user ref alongside account ref. Workspace ref and traits are optional and are recommended to not be populated if workspace modelling actually makes sense for the companies and we have a unique identifier to resolve them. -- Identifiers like email address and display name are recommended to be populated in the user traits so the resultant user is identifiable and also to avoid creating duplicates from other integrations like email integration or outreach. -- Ensure that unique attributes and reference identifiers (Refs) are aligned to avoid conflicts. +- Populate user traits like email and display name to: + - Make users easily identifiable + - Prevent duplicate users across integrations +- Maintain consistent unique identifiers across your system +- Follow the specified formats for phone numbers and domains +- Keep your application access token secure ## Pass the session token From 7f910f5f3f6e71238756545b55f2150619587076 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Thu, 10 Apr 2025 20:21:16 +0530 Subject: [PATCH 10/24] nit --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 9b57d892..b8032118 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -66,6 +66,7 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ | phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ | ❌ | * If nothing is specified, a system-generated name will be assigned to the user. + ** Email uniqueness is subjected to organization preferences. If organization want, it can be marked non unique. But it is not recommended. **Attributes for [workspaces](https://developer.devrev.ai/public/api-reference/rev-orgs/workspaces)** From c4e69ec396899919253d89d18fb9c570f440c307 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Thu, 10 Apr 2025 20:27:46 +0530 Subject: [PATCH 11/24] nit --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index b8032118..f1bde70e 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -2,7 +2,7 @@ Once you have [installed PLuG](./installation), all your users who interact with For users who are logged into your website, you can identify them in PLuG to enable them to view their conversation history and receive more personalized engagement. -To implement user identification, you'll need to generate a session token for each user who visits your website. This token is created using your application access token combined with customer information, and must be generated on your backend to keep the application token secure. +To implement user identification, you need to generate a session token for each user who visits your website. This token is created using your application access token combined with customer information, and must be generated on your backend to keep the application token secure. ## Generate an application access token @@ -65,7 +65,7 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ | display_name | The name of the user that's shown on the widget. | string | ❌* | ❌ | | phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ | ❌ | -* If nothing is specified, a system-generated name will be assigned to the user. +* If nothing is specified, a system-generated name is assigned to the user. ** Email uniqueness is subjected to organization preferences. If organization want, it can be marked non unique. But it is not recommended. @@ -104,7 +104,7 @@ You can pass the custom attributes that are created as shown below: You can pass custom traits, as shown above, not only for `users` but also for `workspaces` and `accounts`. -### API Status codes and troubleshooting +### API status codes and troubleshooting | Status code| Description & Troubleshooting | |----------|----------| @@ -132,7 +132,7 @@ DevRev offers three ways to structure your customer's data: - What to include: User, workspace and account information - Only use workspace information if your business model requires workspace organization -In a DevOrg, we utilize unique identifiers to handle objects. If an object doesn't exist, we create it and then attempt to link it. For example, here's how it operates: +In a DevOrg, unique identifiers are utilized to handle objects. If an object doesn't exist, it is created and then an attempt is made to link it. For example, here's how it operates: User reference: - A user reference is mandatory, ensuring its constant presence. @@ -154,7 +154,7 @@ This approach ensures efficient management and integration of objects within the ### Best practices - Populate user traits like email and display name to: - - Make users easily identifiable + - Make users identifiable - Prevent duplicate users across integrations - Maintain consistent unique identifiers across your system - Follow the specified formats for phone numbers and domains From 584a1d9fd904157e718869d4492d8b0208799ea0 Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Fri, 11 Apr 2025 12:43:27 +0530 Subject: [PATCH 12/24] Update fern/docs/pages/plug-sdk/web/user-identity.mdx Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index f1bde70e..ff3211ef 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -156,9 +156,9 @@ This approach ensures efficient management and integration of objects within the - Populate user traits like email and display name to: - Make users identifiable - Prevent duplicate users across integrations -- Maintain consistent unique identifiers across your system -- Follow the specified formats for phone numbers and domains -- Keep your application access token secure +- Maintain consistent unique identifiers across your system. +- Follow the specified formats for phone numbers and domains. +- Keep your application access token secure. ## Pass the session token From 95843a416cb5f32c8c7e7a01e2922c7bbd823783 Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Fri, 11 Apr 2025 12:43:40 +0530 Subject: [PATCH 13/24] Update fern/docs/pages/plug-sdk/web/user-identity.mdx Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index ff3211ef..3f172c11 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -153,9 +153,7 @@ This approach ensures efficient management and integration of objects within the ### Best practices -- Populate user traits like email and display name to: - - Make users identifiable - - Prevent duplicate users across integrations +- Populate user traits like email and display name to make users identifiable and to prevent duplicate users across integrations. - Maintain consistent unique identifiers across your system. - Follow the specified formats for phone numbers and domains. - Keep your application access token secure. From 85ff888f9ec37a0913fa6c1a5ca517d8ee398948 Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Fri, 11 Apr 2025 12:43:53 +0530 Subject: [PATCH 14/24] Update fern/docs/pages/plug-sdk/web/user-identity.mdx Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 3f172c11..9167e00d 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -132,7 +132,7 @@ DevRev offers three ways to structure your customer's data: - What to include: User, workspace and account information - Only use workspace information if your business model requires workspace organization -In a DevOrg, unique identifiers are utilized to handle objects. If an object doesn't exist, it is created and then an attempt is made to link it. For example, here's how it operates: +In a dev org, unique identifiers are utilized to handle objects. If an object doesn't exist, it is created and then an attempt is made to link it. For example, here's how it operates: User reference: - A user reference is mandatory, ensuring its constant presence. From cea6183c87fa63d409b32c30c250c2e85eddde61 Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Fri, 11 Apr 2025 12:44:23 +0530 Subject: [PATCH 15/24] Update fern/docs/pages/plug-sdk/web/user-identity.mdx Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 9167e00d..869d31a2 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -82,7 +82,7 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ |-----------------|-------------------------------------------------------------------------------------------------------------------|--------|----------|--------| | `account_ref` | A unique reference for the account. | string | ❌ | ✅ | | `display_name` | The name of the account that's shown on the widget. | string | ❌ | ✅ | -| `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | ❌ | ✅ | +| `domains` | Use a format like `devrev.ai`. Formats such as `https://devrev.ai` or `www.devrev.ai` are not valid. | array | ❌ | ✅ | | `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | ❌ | From 5e4bce75ef9eb087125a9181e164851ab5c2dca0 Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Fri, 11 Apr 2025 12:44:45 +0530 Subject: [PATCH 16/24] Update fern/docs/pages/plug-sdk/web/user-identity.mdx Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 869d31a2..909d61cc 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -60,10 +60,10 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ | Attributes | Description | Type | Required | Unique | |---------------|-----------------------------------------------------------------------------|--------|----------|--------| -| user_ref | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | ✅ | -| email | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | ✅** | -| display_name | The name of the user that's shown on the widget. | string | ❌* | ❌ | -| phone_numbers | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ | ❌ | +| `user_ref` | A unique user reference that the DevRev app uses for identifying your users. This parameter is required. | string | ✅ | ✅ | +| `email` | The email address of the customer. It's used for sending email notifications of any support messages. | string | ❌ | ✅** | +| `display_name` | The name of the user that's shown on the widget. | string | ❌* | ❌ | +| `phone_numbers` | The customer's mobile number, which must adhere to the E.164 format. | array | ❌ | ❌ | * If nothing is specified, a system-generated name is assigned to the user. From 1b803fd50741d4141f29512a5b00cd4732d42650 Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Fri, 11 Apr 2025 12:45:02 +0530 Subject: [PATCH 17/24] Update fern/docs/pages/plug-sdk/web/user-identity.mdx Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> --- fern/docs/pages/plug-sdk/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/plug-sdk/web/user-identity.mdx b/fern/docs/pages/plug-sdk/web/user-identity.mdx index 909d61cc..2d051dbd 100644 --- a/fern/docs/pages/plug-sdk/web/user-identity.mdx +++ b/fern/docs/pages/plug-sdk/web/user-identity.mdx @@ -16,7 +16,7 @@ Ensure you copy your access token, as you will not be able to view it again. ## Generate a session token -For security reasons, this API call must be made from your server side to prevent exposing your Application Access Token (AAT). +For security reasons, this API call must be made from the server side to prevent exposing your application access token (AAT). Using the `rev_info` method, you can generate and recognize a user within the DevRev system by providing relevant user details. This method enables you to convey information systematically, ensuring alignment between your DevRev CRM and the structured data model. For information regarding terminologies, click [here](https://devrev.ai/docs/product/grow). From 127fa2451ffe908ef7439b37c57e1c1cca080beb Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Sun, 22 Jun 2025 21:07:31 +0530 Subject: [PATCH 18/24] update status code and trouble shooting --- fern/docs/pages/sdks/web/user-identity.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index de1a9c90..4063cce6 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -83,7 +83,7 @@ curl --location 'https://api.devrev.ai/auth-tokens.create' \ | `account_ref` | A unique reference for the account. | string | ❌ | ✅ | | `display_name` | The name of the account that's shown on the widget. | string | ❌ | ✅ | | `domains` | Use a unique format like 'devrev.ai'. Formats such as 'https://devrev.ai' or 'www.devrev.ai' are not valid. | array | ❌ | ✅ | -| `phone_numbers` | The phone number associated with the account must be in E.164 format. | array | ❌ | ❌ | +| `phone_numbers` | The phone number associated with the account in E.164 format. | array | ❌ | ❌ | Ensure that you follow the specified format when populating phone numbers and domains in the request body. @@ -106,15 +106,15 @@ You can pass custom traits, as shown above, not only for `users` but also for `w ### API status codes and troubleshooting -| Status code| Description & Troubleshooting | +| Status code| Description | Troubleshooting | |----------|----------| -| 200 OK | The request was successful and the session token would be returned in the response. No troubleshooting required. | -| 400 Bad Request | The request was invalid. Check the request body for errors. For fields like domain and phone number, check on their format. | -| 401 Unauthorized | The request was unauthorized. Check if the AAT is valid and not expired. | -| 403 Forbidden | The request was forbidden. Check the authorization header for errors and make sure the token is a valid AAT. | -| 404 Not Found | The requested resource could not be found. Verify the endpoint URL is correct. | -| 429 Too Many Requests | Rate limit exceeded. Implement request throttling or wait before retrying. | -| 500 Internal Server Error | Server encounters an unexpected error. Wait and try again later. If the issue persists, contact support with the request details and timestamp. | +| 200 OK | The request was successful and the session token would be returned in the response. | No troubleshooting required. | +| 400 Bad Request | The request was invalid. | Check the request body for errors. For fields like domain and phone number, check on their format. | +| 401 Unauthorized | The request was unauthorized. | Check if the AAT is valid and not expired. | +| 403 Forbidden | The request was forbidden. | Check the authorization header for errors and make sure the token is a valid AAT. | +| 404 Not Found | The requested resource could not be found. | Verify the endpoint URL is correct. | +| 429 Too Many Requests | Rate limit exceeded. | Implement request throttling or wait before retrying. | +| 500 Internal Server Error | Server encounters an unexpected error. | Wait and try again later. If the issue persists, contact support with the request details and timestamp. | ### How resolution works From 93c311e2ad20fb4fa758562c3102d685ed319385 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Sun, 22 Jun 2025 21:27:17 +0530 Subject: [PATCH 19/24] address comments --- fern/docs/pages/sdks/web/user-identity.mdx | 24 ++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index 4063cce6..c9b86d78 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -6,8 +6,8 @@ To implement user identification, you need to generate a session token for each ## Generate an application access token -1. In DevRev, go to **Settings > Support > PLuG Tokens** through the settings icon on the top-left corner. -2. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed. +1. In DevRev, go to **Settings > Support > PLuG Tokens** through the settings icon on the top-left corner. +2. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed. Ensure you copy your access token, as you will not be able to view it again. @@ -119,18 +119,12 @@ You can pass custom traits, as shown above, not only for `users` but also for `w ### How resolution works DevRev offers three ways to structure your customer's data: -1. **Single-level (Recommended for most B2C cases)** - - User - - What to include: Only user information -2. **Two-level (Recommended for most B2B cases)** - - User → Account - - What to include: User and account information - -3. **Three-level** - - User → Workspace → Account - - What to include: User, workspace and account information - - Only use workspace information if your business model requires workspace organization +| Hierarchy Type | Documents Created | What to Include | Use Case | +|----------------|-------------------|-----------------|----------| +| **Single-level** | Contacts only | Only user information | Recommended for most B2C cases | +| **Two-level** | Accounts and Contacts linked to the account | User and account information | Recommended for most B2B cases | +| **Three-level** | Account with linked workspaces and contacts | User, workspace and account information | Used for B2B cases but only recommended if your business model requires workspace organization | In a DevOrg, unique identifiers are utilized to handle objects. If an object doesn't exist, it is created and then an attempt is made to link it. For example, here's how it operates: @@ -142,12 +136,12 @@ This approach ensures efficient management and integration of objects within the | Workspace Ref | Account Ref | Results | |---------------|-------------|------------------------------------------------------------------------------------------------------| -| ❌ | ✅ | (Most common Usage) \nIf the account doesn’t exist: An account is created, and the user is linked with the account. | +| ❌ | ✅ | (Most common Usage) \nIf the account doesn't exist: An account is created, and the user is linked with the account. | | ❌ | ❌ | No action on account or workspace. The user is returned. | | ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both. | | | | If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both. | | | | If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | -| ✅ | ❌ | If workspace doesn’t exist: System creates a new account and workspace (if needed). User is linked to both. | +| ✅ | ❌ | If workspace doesn't exist: System creates a new account and workspace (if needed). User is linked to both. | From 564e2f5173a20d2a2afa3bd6fb4a1bc27444f82a Mon Sep 17 00:00:00 2001 From: sambhav jain Date: Mon, 23 Jun 2025 08:01:13 +0530 Subject: [PATCH 20/24] Update fern/docs/pages/sdks/web/user-identity.mdx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- fern/docs/pages/sdks/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index 0d26c396..e7d36e2c 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -10,7 +10,7 @@ To implement user identification, you need to generate a session token for each 2. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed. -Ensure you copy your access token, as you will not be able to view it again. +Ensure you copy your access token, as you cannot view it again. ## Generate a session token From d2267a2165a3c49dd7d1e36bc4b4975954391f71 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Mon, 23 Jun 2025 08:04:20 +0530 Subject: [PATCH 21/24] nit --- fern/docs/pages/sdks/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index e7d36e2c..e65d1da0 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -107,7 +107,7 @@ You can pass custom traits, as shown above, not only for `users` but also for `w ### API status codes and troubleshooting | Status code| Description | Troubleshooting | -|----------|----------| +|----------|----------|----------| | 200 OK | The request was successful and the session token would be returned in the response. | No troubleshooting required. | | 400 Bad Request | The request was invalid. | Check the request body for errors. For fields like domain and phone number, check on their format. | | 401 Unauthorized | The request was unauthorized. | Check if the AAT is valid and not expired. | From 4f69730137dc45c59c2ab33fa8ce4ef64c0ab4ea Mon Sep 17 00:00:00 2001 From: Atul-Butola Date: Mon, 23 Jun 2025 14:10:18 +0530 Subject: [PATCH 22/24] Update user-identity.mdx --- fern/docs/pages/sdks/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index e65d1da0..62ee94df 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -140,7 +140,7 @@ This approach ensures efficient management and integration of objects within the |---------------|-------------|------------------------------------------------------------------------------------------------------| | ❌ | ✅ | (Most common Usage) \nIf the account doesn't exist: An account is created, and the user is linked with the account. | | ❌ | ❌ | No action on account or workspace. The user is returned. | -| ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both. | +| ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both.
If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both.
If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | | | | If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both. | | | | If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | | ✅ | ❌ | If workspace doesn't exist: System creates a new account and workspace (if needed). User is linked to both. | From f0d07630d502505f62b840039c4dd3f13dc3bc66 Mon Sep 17 00:00:00 2001 From: Atul-Butola Date: Mon, 23 Jun 2025 14:24:51 +0530 Subject: [PATCH 23/24] Update user-identity.mdx --- fern/docs/pages/sdks/web/user-identity.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index 62ee94df..bb1375d9 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -141,8 +141,6 @@ This approach ensures efficient management and integration of objects within the | ❌ | ✅ | (Most common Usage) \nIf the account doesn't exist: An account is created, and the user is linked with the account. | | ❌ | ❌ | No action on account or workspace. The user is returned. | | ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both.
If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both.
If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | -| | | If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both. | -| | | If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | | ✅ | ❌ | If workspace doesn't exist: System creates a new account and workspace (if needed). User is linked to both. | From c91d11f5af0589a56ca29e393ff6a087cc6af2a5 Mon Sep 17 00:00:00 2001 From: Fern Support <126544928+fern-support@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:00:24 -0400 Subject: [PATCH 24/24] Update user-identity.mdx --- fern/docs/pages/sdks/web/user-identity.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/docs/pages/sdks/web/user-identity.mdx b/fern/docs/pages/sdks/web/user-identity.mdx index bb1375d9..2838c270 100644 --- a/fern/docs/pages/sdks/web/user-identity.mdx +++ b/fern/docs/pages/sdks/web/user-identity.mdx @@ -140,7 +140,7 @@ This approach ensures efficient management and integration of objects within the |---------------|-------------|------------------------------------------------------------------------------------------------------| | ❌ | ✅ | (Most common Usage) \nIf the account doesn't exist: An account is created, and the user is linked with the account. | | ❌ | ❌ | No action on account or workspace. The user is returned. | -| ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both.
If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both.
If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | +| ✅ | ✅ | If neither exists: System creates the account first, then creates the workspace. User is linked to both.
If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both.
If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. | | ✅ | ❌ | If workspace doesn't exist: System creates a new account and workspace (if needed). User is linked to both. |