介绍
专为客服场景定制的 Customer UIKit,提供针对性强的用户侧客服会话界面,满足客服场景需求。UI、交互及功能体验,均面向智能客服场景设计。
此外,Customer UIKit 让集成客服模块省去集成 IM,只需要简短的若干行代码,即可完成开发。
前提条件
环境与版本
Android Studio-Chipmunk
Gradle-6.7.1
Android Gradle Plugin Version-4.2.0
功能展示
快速集成
步骤1: Maven 镜像设置
在项目的
setting.gradle
的 dependencyResolutionManagement
中加入以下内容:repositories {google()mavenCentral()maven {url 'https://mirrors.tencent.com/repository/maven/thirdparty/'}maven {url 'https://mirrors.tencent.com/repository/maven/tencentvideo'name 'galileoAndroidSDK'}gradlePluginPortal()}
步骤2: 包引入
implementation "com.tencentcloud.desk:tencentcloudcustomer:$version"// 最新版本version可在https://central.sonatype.com/artifact/com.tencentcloud.desk/tencentcloudcustomer/versions查看
步骤3: 用户登录
TencentCloudCustomerLoginConfig config = new TencentCloudCustomerLoginConfig(); // config可选填TencentCloudCustomer.getInstance().login(context, sdkAppID, userID, userSign, config, new TencentCloudCustomerLoginCallback() {@Overridepublic void onSuccess() {System.out.println("login success");}@Overridepublic void onError(int code, String desc) {System.out.println("login failed"+code+","+desc);}});
步骤4: 打开新的客服聊天页
startActivity(TencentCloudCustomer.getInstance().getTencentCloudCustomerChatIntent(context));
高级用法
设置主题
TencentCloudCustomer.setTheme(TencentCloudCustomerTheme.DARK);
设置快捷用语
LinkedList<TencentCloudCustomerQuickMessageInfo> quickMessages = new LinkedList<TencentCloudCustomerQuickMessageInfo>();// 详情见快捷用语类TencentCloudCustomer.getInstance().setQuickMessages(quickMessages);
设置携带商品信息
TencentCloudCustomerProductInfo info = new TencentCloudCustomerProductInfo(); // 详情见商品信息类TencentCloudCustomer.getInstance().setProductInfo(info);