Skip to content

Commit 93c311e

Browse files
address comments
1 parent 127fa24 commit 93c311e

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

fern/docs/pages/sdks/web/user-identity.mdx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ To implement user identification, you need to generate a session token for each
66

77
## Generate an application access token
88

9-
1. In DevRev, go to **Settings > Support > PLuG Tokens** through the settings icon on the top-left corner.
10-
2. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
9+
1. In DevRev, go to **Settings > Support > PLuG Tokens** through the settings icon on the top-left corner.
10+
2. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
1111

1212
<Callout intent="note">
1313
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
119119
### How resolution works
120120

121121
DevRev offers three ways to structure your customer's data:
122-
1. **Single-level (Recommended for most B2C cases)**
123-
- User
124-
- What to include: Only user information
125122

126-
2. **Two-level (Recommended for most B2B cases)**
127-
- User → Account
128-
- What to include: User and account information
129-
130-
3. **Three-level**
131-
- User → Workspace → Account
132-
- What to include: User, workspace and account information
133-
- Only use workspace information if your business model requires workspace organization
123+
| Hierarchy Type | Documents Created | What to Include | Use Case |
124+
|----------------|-------------------|-----------------|----------|
125+
| **Single-level** | Contacts only | Only user information | Recommended for most B2C cases |
126+
| **Two-level** | Accounts and Contacts linked to the account | User and account information | Recommended for most B2B cases |
127+
| **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 |
134128

135129
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:
136130

@@ -142,12 +136,12 @@ This approach ensures efficient management and integration of objects within the
142136

143137
| Workspace Ref | Account Ref | Results |
144138
|---------------|-------------|------------------------------------------------------------------------------------------------------|
145-
||| (Most common Usage) \nIf the account doesnt exist: An account is created, and the user is linked with the account. |
139+
||| (Most common Usage) \nIf the account doesn't exist: An account is created, and the user is linked with the account. |
146140
||| No action on account or workspace. The user is returned. |
147141
||| If neither exists: System creates the account first, then creates the workspace. User is linked to both. |
148142
| | | If account exists but workspace doesn't: System creates the workspace under the existing account. User is linked to both. |
149143
| | | If workspace exists under different account: System returns an error, as workspaces cannot be a part of 2 accounts. |
150-
||| If workspace doesnt exist: System creates a new account and workspace (if needed). User is linked to both. |
144+
||| If workspace doesn't exist: System creates a new account and workspace (if needed). User is linked to both. |
151145

152146

153147

0 commit comments

Comments
 (0)