Flutter、DCloud、APICloud
# Flutter、DCloud、APICloud
—— Sobot SDK third-party multi-channel (Flutter, DCloud, APICloud) docking.
# File Introduction
Sobot fully supports five access methods, including desktop site, mobile site, WeChat, Weibo and APP. Sobot can be embedded into all marketing channels in only 10 minutes, and user feedback from all channels can be summarized to the Sobot platform for unified and easy management. The efficiency of enterprise agent has been improved by more than 50%. Sobot SDK is developed in the native language of Android and iOS, and used as a mobile plug-in. It can perfectly adapt to various versions and system features, and has excellent use experience.
Considering the different development environments of customers, according to customers' needs, Sobot SDK provides plug-in support based on Flutter, APICloud, DCloud and other platforms, which can facilitate users to integrate Sobot client products more conveniently.
- Registration method:
Log in to Sobot Admin Backend (opens new window) using the admin account, and create an app on Desktop Site Agent - APP - Add APP to get app_key
for configuration.
[Note: The minimum version supported by this module is iOS 9.0, and Android 4.2.]
# Supported Channel Use Description
# ● Flutter
# 1. Channel description
On Flutter platform, Sobot exists as a native plug-in. Click the path https://pub.dev/packages/flutter_sobot (opens new window) to get the Sobot SDK native plug-in.
[Note: Flutter platform does not provide an independent e-commerce platform version. If you need to use it, please contact after-sales personnel and transfer it to us.]
# 2. Integration description
- Add dependency and import package:
flutter_sobot: ^ (Fill in the version no.)
// Import package
import "package:flutter_sobot/sobotsdk.dart";
// Instantiation
final zhiChiSobot = SobotApi();
2
3
4
5
- Method description :
Initiate Sobot system startZhiChi
Initiate Help Center openSobotHelpCenter
Get unread messages getUnReadMessage
Log out chat closeSobotChat
- Sample code
// Initiate Sobot system
Future<void> startZhichi() async {
var params = {
'app_key': 'your appkey',
'partnerid': ' 123456789 ',
};
final result = await zhiChiSobot.startZhichi(params);
handleJson(result);
}
// Initiate Help Center
Future<void> openSobotHelpCenter() async {
var params = {
'app_key': 'your appkey',
'partnerid': ' 123456789 ',
};
final result = await zhiChiSobot.openSobotHelpCenter(params);
print(result);
}
// Get unread messages
Future getUnReadMessage() async {
var params = {'partnerid': ' 123456789 '};
var result = await zhiChiSobot.getUnReadMessage(params);
print(result);
}
// Log out chat
Future<void> closeSobotChat() async {
final result = await zhiChiSobot.closeSobotChat();
print(result);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
- Param description
Refer to Platform Docking Page (opens new window) description
# ● DCloud
# 1. Channel description
On DCloud platform, Sobot exists as a native plug-in. Click the path https://ext.dcloud.net.cn/search?q=Sobot (opens new window) to get the Sobot SDK (opens new window) native plug-in.
[Note: DCloud platform does not provide an independent e-commerce platform version. If you need to use it, please contact after-sales personnel and transfer it to us.]
# 2. Integration description
- Module name zhiChi-SobotKit
Instantiation plug-in
const zhiChiSobot = uni.requireNativePlugin('zhiChi-SobotKit');
2
Method description
Initiate Sobot system startZhiChi
Initiate Help Center openSobotHelpCenter
Get unread messages getUnReadMessage
Log out chat closeSobotChat
Sample code
const zhiChiSobot = uni.requireNativePlugin('zhiChi-SobotKit');
// Initiate Sobot system
zhiChiSobot.startZhiChi({app_key:" 1c1da2c0aad047d7ba1d14ecd18ae4f6 ",
partnerid:" 123456789 ",
user_nick:"Your nickName"},result => {
// When the user is not on the chat page, if the chat does not end yet, the last message and unread messages can be received in real time; Return value {type: 3, value: new message content, num: no. of unread messages, desc: description}
const msg = JSON.stringify(result);
uni.showToast({
title: msg,
duration: 5000
});
});
// Initiate Help Center
zhiChiSobot.openSobotHelpCenter({
app_key:" 1c1da2c0aad047d7ba1d14ecd18ae4f6 ",
partnerid:" 123456789 ",
user_nick:"Your nickName",
});
// Get unread messages:
zhiChiSobot.getUnReadMessage({partnerid:"123456789"},result => {
// Return value {type:4, value: no. of messages: desc: description}
const msg = JSON.stringify(result);
uni.showToast({
title: msg,
duration: 5000
});
});
zhiChiSobot.closeSobotChat();
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
- Param Description
Refer to Platform Docking Page (opens new window) description.
# ● APICloud
# 1. Channel description
On APICloud platform, Sobot exists as a native module Store. Click the path https://www.apicloud.com/mod_tags?tag=Sobot (opens new window) to get 2 Sobot SDK (E-commerce (opens new window) and Basic (opens new window)) support modules.
[Note: Basic and E-commerce have the same basic service capabilities, but E-commerce has a multi-level customer system, so they must be accessed according to the actual supported services.]
# 2. Integration description
Module name
E-commerce: zhiChiSobotMall
Basic: zhiChiSobotMethod description
1.Initiate Sobot system startZhiChiSobot(params)
2.Get unread messages getUnReadMessage(params)
3.End chat proactively closeSobotChat(params)
4.Initiate Sobot Message Center (inquiry merchant list) startZhiChiSobotMsgCenter(params)Sample code
var param = {
app_key:" f9caa813546b42c98d5f5701f6d1c30d ",
partnerid:"Your userId",
user_nick:"Your nickName",
user_tels:"Your user phone",
user_emails:"Your email",
params:{"age":"18","uname":"SobotAPICloud"},
groupid:"",
isShowTansfer:true,
titleFont:18.0,
backgroundColor:"#f0f0f0",
topViewTextColor:"#FFFFFF",
isCustomLinkClick:false,
};
function callBack(ret,err){
alert("ret.type="+ret.type+"\nvalue="+ret.value+"\nret.desc="+ret.desc);
}
var zhichi = api.require('zhiChiSobot');
// Initiate Sobot system
zhichi.startZhiChiSobot(param,callBack);
// Get unread messages
zhiChiSobot.getUnReadMessage({
},function(ret){
alert("ret.type="+ret.type+"\nvalue="+ret.value+"\nret.desc="+ret.desc);
});
// End chat proactively
zhiChiSobot.closeSobotChat({"isClosePush":true});
// Initiate merchant list
zhiChiSobot.startZhiChiSobotMsgCenter({
userId:"00002",
customBannerColor:"#08b0b0",
socketStatusButtonBgColor:"#08b0b0",
});
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
- Param Description
Refer to Platform Docking Page (opens new window) description.
# FAQ
Sobot iOS_SDK UI source code Git download URL: https://github.com/ZCSDK/sobotKit_UI_iOS (opens new window)。
FAQ :
Please click link (opens new window) to enter the intelligent bot page and enter your question
# Description of Sobot SDK's Collection and Use of Personal Information
Description of Sobot SDK's Collection and Use of Personal Information (opens new window)