Skip to content

Commit 571bef7

Browse files
Add identification model usage documentation
1 parent 6865218 commit 571bef7

File tree

5 files changed

+329
-2
lines changed

5 files changed

+329
-2
lines changed

fern/docs/pages/sdks/mobile/android/features.mdx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,72 @@ You can perform a logout of the current user by calling the following method:
183183

184184
The user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
185185

186+
### Identity model
187+
188+
The `Identity` class is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser(_:)` and `updateUser(_:)` methods.
189+
190+
#### Properties
191+
192+
The `Identity` class contains the following properties:
193+
194+
| Property | Type | Required | Description |
195+
|----------|------|----------|-------------|
196+
| `userID` | `String` || A unique identifier for the user |
197+
| `organizationID` | `String?` || An identifier for the user's organization |
198+
| `accountID` | `String?` || An identifier for the user's account |
199+
| `userTraits` | `UserTraits?` || Additional information about the user |
200+
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
201+
| `accountTraits` | `AccountTraits?` || Additional information about the account |
202+
203+
> [!NOTE]
204+
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
205+
206+
##### UserTraits
207+
208+
The `UserTraits` class contains detailed information about the user:
209+
210+
> [!NOTE]
211+
> All properties in `UserTraits` are optional.
212+
| Property | Type | Description |
213+
|----------|------|-------------|
214+
| `displayName` | `String?` | The displayed name of the user |
215+
| `email` | `String?` | The user's email address |
216+
| `fullName` | `String?` | The user's full name |
217+
| `userDescription` | `String?` | A description of the user |
218+
| `phoneNumbers` | `[String]?` | Array of the user's phone numbers |
219+
| `customFields` | `[String: Any]?` | Dictionary of custom fields configured in DevRev |
220+
221+
##### OrganizationTraits
222+
223+
The `OrganizationTraits` class contains detailed information about the organization:
224+
225+
> [!NOTE]
226+
> All properties in `OrganizationTraits` are optional.
227+
| Property | Type | Description |
228+
|----------|------|-------------|
229+
| `displayName` | `String?` | The displayed name of the organization |
230+
| `domain` | `String?` | The organization's domain |
231+
| `organizationDescription` | `String?` | A description of the organization |
232+
| `phoneNumbers` | `[String]?` | Array of the organization's phone numbers |
233+
| `tier` | `String?` | The organization's tier or plan level |
234+
| `customFields` | `[String: Any]?` | Dictionary of custom fields configured in DevRev |
235+
236+
##### AccountTraits
237+
238+
The `AccountTraits` class contains detailed information about the account:
239+
240+
> [!NOTE]
241+
> All properties in `AccountTraits` are optional.
242+
| Property | Type | Description |
243+
|----------|------|-------------|
244+
| `displayName` | `String?` | The displayed name of the account |
245+
| `domains` | `[String]?` | Array of domains associated with the account |
246+
| `accountDescription` | `String?` | A description of the account |
247+
| `phoneNumbers` | `[String]?` | Array of the account's phone numbers |
248+
| `websites` | `[String]?` | Array of websites associated with the account |
249+
| `tier` | `String?` | The account's tier or plan level |
250+
| `customFields` | `[String: Any]?` | Dictionary of custom fields configured in DevRev |
251+
186252
## PLuG support chat
187253

188254
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. To open the chat dialog, your application should use the `showSupport` API, as shown in the following example:

fern/docs/pages/sdks/mobile/cordova/features.mdx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,71 @@ You can log out the current user by using the following method:
106106
DevRev.logout(deviceID, successCallback, errorCallback)
107107
```
108108

109+
### Identity model
110+
111+
The `Identity` interface is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser` and `updateUser` methods.
112+
113+
#### Properties
114+
115+
The `Identity` class contains the following properties:
116+
117+
| Property | Type | Required | Description |
118+
|----------|------|----------|-------------|
119+
| `userRef` | `string` || A unique identifier for the user |
120+
| `organizationRef` | `string OR null` || An identifier for the user's organization |
121+
| `accountRef` | `string OR null` || An identifier for the user's account |
122+
| `userTraits` | `UserTraits OR null` || Additional information about the user |
123+
| `organizationTraits` | `OrganizationTraits OR null` || Additional information about the organization |
124+
| `accountTraits` | `AccountTraits OR null` || Additional information about the account |
125+
126+
> [!NOTE]
127+
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
128+
129+
##### UserTraits
130+
131+
The `UserTraits` class contains detailed information about the user:
132+
133+
> [!NOTE]
134+
> All properties in `UserTraits` are optional.
135+
| Property | Type | Description |
136+
|----------|------|-------------|
137+
| `displayName` | `string OR null` | The displayed name of the user |
138+
| `email` | `string OR null` | The user's email address |
139+
| `fullName` | `string OR null` | The user's full name |
140+
| `description` | `string OR null` | A description of the user |
141+
| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |
142+
143+
##### OrganizationTraits
144+
145+
The `OrganizationTraits` class contains detailed information about the organization:
146+
147+
> [!NOTE]
148+
> All properties in `OrganizationTraits` are optional.
149+
| Property | Type | Description |
150+
|----------|------|-------------|
151+
| `displayName` | `string OR null` | The displayed name of the organization |
152+
| `domain` | `string OR null` | The organization's domain |
153+
| `description` | `string OR null` | A description of the organization |
154+
| `phoneNumbers` | `string[] OR null` | Array of the organization's phone numbers |
155+
| `tier` | `string OR null` | The organization's tier or plan level |
156+
| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |
157+
158+
##### AccountTraits
159+
160+
The `AccountTraits` class contains detailed information about the account:
161+
162+
> [!NOTE]
163+
> All properties in `AccountTraits` are optional.
164+
| Property | Type | Description |
165+
|----------|------|-------------|
166+
| `displayName` | `string or null` | The displayed name of the account |
167+
| `domains` | `string[] OR null` | Array of domains associated with the account |
168+
| `description` | `string OR null` | A description of the account |
169+
| `phoneNumbers` | `string[] OR null` | Array of the account's phone numbers |
170+
| `websites` | `string[] OR null` | Array of websites associated with the account |
171+
| `tier` | `string OR null` | The account's tier or plan level |
172+
| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |
173+
109174
The user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
110175

111176
## PLuG support chat

fern/docs/pages/sdks/mobile/flutter/features.mdx

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,71 @@ await DevRev.updateUser(Identity(organizationID: "organization-1337"))
144144
await DevRev.logout(deviceID: "dvc32423")
145145
```
146146

147+
### Identity model
148+
149+
The `Identity` interface is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser` and `updateUser` methods.
150+
151+
#### Properties
152+
153+
The `Identity` class contains the following properties:
154+
155+
| Property | Type | Required | Description |
156+
|----------|------|----------|-------------|
157+
| `userRef` | `String` || A unique identifier for the user |
158+
| `organizationRef` | `String?` || An identifier for the user's organization |
159+
| `accountRef` | `String?` || An identifier for the user's account |
160+
| `userTraits` | `UserTraits?` || Additional information about the user |
161+
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
162+
| `accountTraits` | `AccountTraits?` || Additional information about the account |
163+
164+
> [!NOTE]
165+
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
166+
167+
##### UserTraits
168+
169+
The `UserTraits` class contains detailed information about the user:
170+
171+
> [!NOTE]
172+
> All properties in `UserTraits` are optional.
173+
| Property | Type | Description |
174+
|----------|------|-------------|
175+
| `displayName` | `String?` | The displayed name of the user |
176+
| `email` | `String?` | The user's email address |
177+
| `fullName` | `String?` | The user's full name |
178+
| `description` | `String?` | A description of the user |
179+
| `customFields` | `{ [key: String]: any }` | Dictionary of custom fields configured in DevRev |
180+
181+
##### OrganizationTraits
182+
183+
The `OrganizationTraits` class contains detailed information about the organization:
184+
185+
> [!NOTE]
186+
> All properties in `OrganizationTraits` are optional.
187+
| Property | Type | Description |
188+
|----------|------|-------------|
189+
| `displayName` | `String?` | The displayed name of the organization |
190+
| `domain` | `String?` | The organization's domain |
191+
| `description` | `String?` | A description of the organization |
192+
| `phoneNumbers` | `String[]?` | Array of the organization's phone numbers |
193+
| `tier` | `String?` | The organization's tier or plan level |
194+
| `customFields` | `{ [key: String]: any }` | Dictionary of custom fields configured in DevRev |
195+
196+
##### AccountTraits
197+
198+
The `AccountTraits` class contains detailed information about the account:
199+
200+
> [!NOTE]
201+
> All properties in `AccountTraits` are optional.
202+
| Property | Type | Description |
203+
|----------|------|-------------|
204+
| `displayName` | `String?` | The displayed name of the account |
205+
| `domains` | `String[]?` | Array of domains associated with the account |
206+
| `description` | `String?` | A description of the account |
207+
| `phoneNumbers` | `String[]?` | Array of the account's phone numbers |
208+
| `websites` | `String[]?` | Array of websites associated with the account |
209+
| `tier` | `String?` | The account's tier or plan level |
210+
| `customFields` | `{ [key: String]: any }` | Dictionary of custom fields configured in DevRev |
211+
147212
## PLuG support chat
148213

149214
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen.
@@ -425,7 +490,7 @@ if (messageJson != null) {
425490
On iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK will then handle the notification and execute the necessary actions.
426491

427492
```dart
428-
DevRev.processPushNotification(payload: string)
493+
DevRev.processPushNotification(payload: String)
429494
```
430495

431496
##### Example

fern/docs/pages/sdks/mobile/ios/features.mdx

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Use this property to check whether the user is identified in the current session
114114
await DevRev.isUserIdentified
115115
```
116116

117-
#### Logout
117+
### Logout
118118

119119
You can perform a logout of the current user by calling the following method:
120120

@@ -143,6 +143,71 @@ await DevRev.updateUser(Identity(organizationID: "organization-1337"))
143143
await DevRev.logout(deviceID: "dvc32423")
144144
```
145145

146+
### Identity model
147+
148+
The `Identity` class is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser(_:)` and `updateUser(_:)` methods.
149+
150+
#### Properties
151+
152+
The `Identity` class contains the following properties:
153+
154+
| Property | Type | Required | Description |
155+
|----------|------|----------|-------------|
156+
| `userID` | `String` || A unique identifier for the user |
157+
| `organizationID` | `String?` || An identifier for the user's organization |
158+
| `accountID` | `String?` || An identifier for the user's account |
159+
| `userTraits` | `UserTraits?` || Additional information about the user |
160+
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
161+
| `accountTraits` | `AccountTraits?` || Additional information about the account |
162+
163+
> [!NOTE]
164+
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
165+
##### UserTraits
166+
167+
The `UserTraits` class contains detailed information about the user:
168+
169+
> [!NOTE]
170+
> All properties in `UserTraits` are optional.
171+
| Property | Type | Description |
172+
|----------|------|-------------|
173+
| `displayName` | `String?` | The displayed name of the user |
174+
| `email` | `String?` | The user's email address |
175+
| `fullName` | `String?` | The user's full name |
176+
| `userDescription` | `String?` | A description of the user |
177+
| `phoneNumbers` | `[String]?` | Array of the user's phone numbers |
178+
| `customFields` | `[String: Any]?` | Dictionary of custom fields configured in DevRev |
179+
180+
##### OrganizationTraits
181+
182+
The `OrganizationTraits` class contains detailed information about the organization:
183+
184+
> [!NOTE]
185+
> All properties in `OrganizationTraits` are optional.
186+
| Property | Type | Description |
187+
|----------|------|-------------|
188+
| `displayName` | `String?` | The displayed name of the organization |
189+
| `domain` | `String?` | The organization's domain |
190+
| `organizationDescription` | `String?` | A description of the organization |
191+
| `phoneNumbers` | `[String]?` | Array of the organization's phone numbers |
192+
| `tier` | `String?` | The organization's tier or plan level |
193+
| `customFields` | `[String: Any]?` | Dictionary of custom fields configured in DevRev |
194+
195+
##### AccountTraits
196+
197+
The `AccountTraits` class contains detailed information about the account:
198+
199+
> [!NOTE]
200+
> All properties in `AccountTraits` are optional.
201+
| Property | Type | Description |
202+
|----------|------|-------------|
203+
| `displayName` | `String?` | The displayed name of the account |
204+
| `domains` | `[String]?` | Array of domains associated with the account |
205+
| `accountDescription` | `String?` | A description of the account |
206+
| `phoneNumbers` | `[String]?` | Array of the account's phone numbers |
207+
| `websites` | `[String]?` | Array of websites associated with the account |
208+
| `tier` | `String?` | The account's tier or plan level |
209+
| `customFields` | `[String: Any]?` | Dictionary of custom fields configured in DevRev |
210+
146211
## PLuG support chat
147212

148213
### UIKit

fern/docs/pages/sdks/mobile/react-native/features.mdx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,72 @@ You can logout of the current user by using the following method:
104104
```typescript
105105
DevRev.logout(deviceID: string)
106106
```
107+
108+
### Identity model
109+
110+
The `Identity` interface is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser` and `updateUser` methods.
111+
112+
#### Properties
113+
114+
The `Identity` class contains the following properties:
115+
116+
| Property | Type | Required | Description |
117+
|----------|------|----------|-------------|
118+
| `userRef` | `string` || A unique identifier for the user |
119+
| `organizationRef` | `string?` || An identifier for the user's organization |
120+
| `accountRef` | `string?` || An identifier for the user's account |
121+
| `userTraits` | `UserTraits?` || Additional information about the user |
122+
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
123+
| `accountTraits` | `AccountTraits?` || Additional information about the account |
124+
125+
> [!NOTE]
126+
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
127+
128+
##### UserTraits
129+
130+
The `UserTraits` class contains detailed information about the user:
131+
132+
> [!NOTE]
133+
> All properties in `UserTraits` are optional.
134+
| Property | Type | Description |
135+
|----------|------|-------------|
136+
| `displayName` | `string?` | The displayed name of the user |
137+
| `email` | `string?` | The user's email address |
138+
| `fullName` | `string?` | The user's full name |
139+
| `description` | `string?` | A description of the user |
140+
| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |
141+
142+
##### OrganizationTraits
143+
144+
The `OrganizationTraits` class contains detailed information about the organization:
145+
146+
> [!NOTE]
147+
> All properties in `OrganizationTraits` are optional.
148+
| Property | Type | Description |
149+
|----------|------|-------------|
150+
| `displayName` | `string?` | The displayed name of the organization |
151+
| `domain` | `string?` | The organization's domain |
152+
| `description` | `string?` | A description of the organization |
153+
| `phoneNumbers` | `string[]?` | Array of the organization's phone numbers |
154+
| `tier` | `string?` | The organization's tier or plan level |
155+
| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |
156+
157+
##### AccountTraits
158+
159+
The `AccountTraits` class contains detailed information about the account:
160+
161+
> [!NOTE]
162+
> All properties in `AccountTraits` are optional.
163+
| Property | Type | Description |
164+
|----------|------|-------------|
165+
| `displayName` | `string?` | The displayed name of the account |
166+
| `domains` | `string[]?` | Array of domains associated with the account |
167+
| `description` | `string?` | A description of the account |
168+
| `phoneNumbers` | `string[]?` | Array of the account's phone numbers |
169+
| `websites` | `string[]?` | Array of websites associated with the account |
170+
| `tier` | `string?` | The account's tier or plan level |
171+
| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |
172+
107173
## PLuG support chat
108174

109175
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen.

0 commit comments

Comments
 (0)