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
Copy file name to clipboardExpand all lines: README.md
+20-31Lines changed: 20 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@
4
4
5
5
React native wrapper for zendesk unified SDK. Supports both iOS and Android platforms.
6
6
7
-
# NOTICE
8
-
This is my very first npm package and I am still a newbie. Anyone if has suggestions/improvements or any feature PRs you are most welcome, would love to get make the package as much generalised for everyone as possible. Only very basic stuff is supported at this moment.
9
-
10
-
11
7
## VERSIONS
12
8
It's an alpha version release as of now and only tested on RN >=0.61.0. Bugs and issues can be there.
13
9
@@ -51,10 +47,10 @@ Place this code at the root of your application to initialize Zendesk SDK.
51
47
For all supported SDKs
52
48
```javascript
53
49
RNZendeskChat.init({
54
-
key:<chatAccountKey>,
55
-
appId:<appId>,
56
-
url:<zendeskUrl>,
57
-
clientId:<zendeskClientId>,
50
+
key:<chatAccountKey>,
51
+
appId:<appId>,
52
+
url:<zendeskUrl>,
53
+
clientId:<zendeskClientId>,
58
54
})
59
55
```
60
56
@@ -65,29 +61,29 @@ Step 2. Set user identifier
65
61
- If your chat just runs behind a login you can pass in name and email whenever user logins if not, pass a JWT Token to identify the user on chat
66
62
67
63
```
68
-
RNZendeskChat.setUserIdentity({
69
-
name: <name>,
70
-
email: <email>,
71
-
})
64
+
RNZendeskChat.setUserIdentity({
65
+
name: <name>,
66
+
email: <email>,
67
+
})
72
68
```
73
69
- If you want to start chat without any user details you can use a JWT token.
74
70
```
75
-
RNZendeskChat.setUserIdentity({
71
+
RNZendeskChat.setUserIdentity({
76
72
token: <JWT TOKEN>
77
-
})
73
+
})
78
74
```
79
75
80
76
Step 3. Show the UI based on what SDK you want to use
81
77
### Chat SDK
82
78
** To use chat sdk without answer bot, please add `chatOnly: true` in this method
83
79
```
84
-
ZendeskChat.startChat({
85
-
name: user.full_name,
86
-
email: user.email,
87
-
phone: user.mobile_phone,
88
-
tags: ['tag1', 'tag2'],
89
-
department: "Your department"
90
-
});
80
+
ZendeskChat.startChat({
81
+
name: user.full_name,
82
+
email: user.email,
83
+
phone: user.mobile_phone,
84
+
tags: ['tag1', 'tag2'],
85
+
department: "Your department"
86
+
});
91
87
```
92
88
| Props | Description |
93
89
|--|--|
@@ -104,8 +100,8 @@ Step 3. Show the UI based on what SDK you want to use
104
100
To initiate and display help center use the following method:
105
101
```
106
102
RNZendesk.showHelpCenter({
107
-
withChat: true // add this if you want to use chat instead of ticket creation
108
-
disableTicketCreation: true // add this if you want to just show help center and not add ticket creation
103
+
withChat: true // add this if you want to use chat instead of ticket creation
104
+
disableTicketCreation: true // add this if you want to just show help center and not add ticket creation
109
105
})
110
106
```
111
107
You can use either of these options `withChat` or `disableTicketCreation`, both can't be used together.
@@ -149,13 +145,6 @@ For iOS only added a new function which can be used as below. This would set the
149
145
150
146
```
151
147
152
-
### Push notifications
153
-
For push notifications added a method to register token in Zendesk, all other handling and stuff needs to be done on the app itself.
0 commit comments