You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -6,11 +6,11 @@ To access certain features of the DevRev SDK, user identification is required.
6
6
7
7
The identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(appID)` method.
8
8
9
-
<Calloutintent="tip">
9
+
<Calloutintent="note">
10
10
On iOS, if you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.
11
11
</Callout>
12
12
13
-
<Calloutintent="tip">
13
+
<Calloutintent="note">
14
14
The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be utilized. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
15
15
</Callout>
16
16
@@ -21,7 +21,7 @@ You can select from the following methods to identify users within your applicat
21
21
The anonymous identification method allows you to create an anonymous user with an optional user identifier, ensuring that no other data is stored or associated with the user.
The verified identification method is used to identify users with an identifier unique to your system within the DevRev platform. The verification is done through a token exchange process between you and the DevRev backend.
38
-
39
-
The steps to identify a verified user are as follows:
40
-
1. Generate an AAT for your system (preferably through your backend).
41
-
2. Exchange your AAT for a session token for each user of your system.
42
-
3. Pass the user identifier and the exchanged session token to the `DevRev.identifyVerifiedUser(_:sessionToken:)` method.
43
-
44
-
<Calloutintent="warning">
45
-
For security reasons, it is **strongly recommended** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
46
-
</Callout>
47
-
48
-
#### Generate an AAT
49
-
50
-
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.
51
-
2. Open the **PLuG Tokens** page.
52
-
3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
53
-
54
-
<Calloutintent="warning">
55
-
Ensure that you copy the generated application access token, as you cannot view it again.
56
-
</Callout>
57
-
58
-
#### Exchange your AAT for a session token
59
-
60
-
To proceed with identifying the user, you need to exchange your AAT for a session token. This step helps you identify a user of your own system within the DevRev platform.
61
-
62
-
Here is a simple example of an API request to the DevRev backend to exchange your AAT for a session token:
63
-
64
-
<Calloutintent="warning">
65
-
Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
The user is logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
116
-
117
-
### Identity model
118
-
119
-
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.
120
-
121
-
#### Properties
63
+
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.
122
64
123
-
The `Identity` class contains the following properties:
124
-
125
-
| Property | Type | Required | Description |
126
-
|----------|------|----------|-------------|
127
-
|`userRef`|`string`| ✅ | A unique identifier for the user |
128
-
|`organizationRef`|`string OR null`| ❌ | An identifier for the user's organization |
129
-
|`accountRef`|`string OR null`| ❌ | An identifier for the user's account |
130
-
|`userTraits`|`UserTraits OR null`| ❌ | Additional information about the user |
131
-
|`organizationTraits`|`OrganizationTraits OR null`| ❌ | Additional information about the organization |
132
-
|`accountTraits`|`AccountTraits OR null`| ❌ | Additional information about the account |
133
-
134
-
<Calloutintent="note">
135
-
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.
136
-
</Callout>
137
-
138
-
##### User traits
139
-
140
-
The `UserTraits` class contains detailed information about the user:
141
-
142
-
<Calloutintent="note">
143
-
All properties in `UserTraits` are optional.
144
-
</Callout>
145
-
146
-
| Property | Type | Description |
147
-
|----------|------|-------------|
148
-
|`displayName`|`string OR null`| The displayed name of the user |
149
-
|`email`|`string OR null`| The user's email address |
150
-
|`fullName`|`string OR null`| The user's full name |
151
-
|`description`|`string OR null`| A description of the user |
152
-
|`customFields`|`{ [key: string]: any }`| Dictionary of custom fields configured in DevRev |
153
-
154
-
##### Organization traits
155
-
156
-
The `OrganizationTraits` class contains detailed information about the organization:
157
-
158
-
<Calloutintent="note">
159
-
All properties in `OrganizationTraits` are optional.
160
-
</Callout>
161
-
162
-
| Property | Type | Description |
163
-
|----------|------|-------------|
164
-
|`displayName`|`string OR null`| The displayed name of the organization |
165
-
|`domain`|`string OR null`| The organization's domain |
166
-
|`description`|`string OR null`| A description of the organization |
167
-
|`phoneNumbers`|`string[] OR null`| Array of the organization's phone numbers |
168
-
|`tier`|`string OR null`| The organization's tier or plan level |
169
-
|`customFields`|`{ [key: string]: any }`| Dictionary of custom fields configured in DevRev |
170
-
171
-
##### Account traits
65
+
## PLuG support chat
172
66
173
-
The `AccountTraits` class contains detailed information about the account:
67
+
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.
174
68
175
69
<Calloutintent="note">
176
-
All properties in `AccountTraits`are optional.
70
+
This functionality requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
177
71
</Callout>
178
72
179
-
| Property | Type | Description |
180
-
|----------|------|-------------|
181
-
|`displayName`|`string or null`| The displayed name of the account |
182
-
|`domains`|`string[] OR null`| Array of domains associated with the account |
183
-
|`description`|`string OR null`| A description of the account |
184
-
|`phoneNumbers`|`string[] OR null`| Array of the account's phone numbers |
185
-
|`websites`|`string[] OR null`| Array of websites associated with the account |
186
-
|`tier`|`string OR null`| The account's tier or plan level |
187
-
|`customFields`|`{ [key: string]: any }`| Dictionary of custom fields configured in DevRev |
188
-
189
-
## PLuG support chat
190
-
191
-
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.
192
-
193
73
To show the support chat screen in your app, you can use the following method:
You can initiate a new support conversation directly from your app. This method displays the support chat screen and simultaneously creates a new conversation.
The DevRev SDK allows you to configure the theme dynamically based on the system appearance, or use the theme configured on the DevRev portal. By default, the theme is dynamic and follows the system appearance.
@@ -270,7 +146,6 @@ The session recording feature includes the following methods to control the reco
270
146
|`DevRev.stopRecording(successCallback, errorCallback)`| Ends the session recording and uploads it to the portal. |
271
147
|`DevRev.pauseRecording(successCallback, errorCallback)`| Pauses the ongoing session recording. |
272
148
|`DevRev.resumeRecording(successCallback, errorCallback)`| Resumes a paused session recording. |
273
-
|`DevRev.processAllOnDemandSessions(successCallback, errorCallback)`| Stops the ongoing user recording and sends all on-demand sessions along with the current recording. |
274
149
275
150
### Session properties
276
151
@@ -280,7 +155,7 @@ You can add custom properties to the session recording to help you understand th
The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although view controllers are automatically tracked, you can manually track screens using the following method:
@@ -349,7 +211,7 @@ The DevRev backend sends push notifications to your app to alert users about new
349
211
350
212
### Configuration
351
213
352
-
To receive push notifications, you need to configure your DevRev organization by following the instructions in the [push notifications](../push-notifications) section.
214
+
To receive push notifications, you need to configure your DevRev organization by following the instructions in the [push notifications](../push-notification) section.
353
215
354
216
### Register for push notifications
355
217
@@ -367,7 +229,7 @@ On Android devices, the `deviceToken` should be the Firebase Cloud Messaging (FC
367
229
368
230
### Unregister from push notifications
369
231
370
-
If your app no longer needs to receive push notifications, you can unregister the device.
232
+
If your app no longer needs to receive push notifications, you can unregister the device.
371
233
372
234
Use the following method to unregister the device:
On iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK handles the notification and executes the necessary actions.
279
+
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.
Copy file name to clipboardExpand all lines: fern/docs/pages/sdks/mobile/cordova/migration-guide.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
This guide and chart should help facilitate the transition from the legacy UserExperior SDK to the new DevRev SDK in your Cordova application, providing insights into feature equivalents and method changes.
0 commit comments