|
| 1 | +package me.chanjar.weixin.cp.bean.kf; |
| 2 | + |
| 3 | +import com.google.gson.annotations.SerializedName; |
| 4 | +import lombok.Data; |
| 5 | +import lombok.EqualsAndHashCode; |
| 6 | +import lombok.NoArgsConstructor; |
| 7 | +import me.chanjar.weixin.cp.bean.WxCpBaseResp; |
| 8 | +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; |
| 9 | + |
| 10 | +import java.util.List; |
| 11 | + |
| 12 | +/** |
| 13 | + * 获取「客户数据统计」企业汇总数据 |
| 14 | + * |
| 15 | + * @author zhongjun |
| 16 | + * @date 2022/4/25 |
| 17 | + **/ |
| 18 | +@EqualsAndHashCode(callSuper = true) |
| 19 | +@NoArgsConstructor |
| 20 | +@Data |
| 21 | +public class WxCpKfGetCorpStatisticResp extends WxCpBaseResp { |
| 22 | + private static final long serialVersionUID = -89898989898989898L; |
| 23 | + |
| 24 | + /** |
| 25 | + * 统计数据列表 |
| 26 | + */ |
| 27 | + @SerializedName("statistic_list") |
| 28 | + private List<StatisticList> statisticList; |
| 29 | + |
| 30 | + @NoArgsConstructor |
| 31 | + @Data |
| 32 | + public static class StatisticList { |
| 33 | + /** |
| 34 | + * 数据统计日期,为当日0点的时间戳 |
| 35 | + */ |
| 36 | + @SerializedName("stat_time") |
| 37 | + private Long statTime; |
| 38 | + |
| 39 | + /** |
| 40 | + * 一天的统计数据。若当天未产生任何下列统计数据或统计数据还未计算完成则不会返回此项 |
| 41 | + */ |
| 42 | + @SerializedName("statistic") |
| 43 | + private Statistic statistic; |
| 44 | + } |
| 45 | + |
| 46 | + @NoArgsConstructor |
| 47 | + @Data |
| 48 | + public static class Statistic { |
| 49 | + |
| 50 | + /** |
| 51 | + * 咨询会话数。客户发过消息并分配给接待人员或智能助手的客服会话数,转接不会产生新的会话 |
| 52 | + */ |
| 53 | + @SerializedName("session_cnt") |
| 54 | + private Integer sessionCnt; |
| 55 | + |
| 56 | + /** |
| 57 | + * 咨询客户数。在会话中发送过消息的客户数量,若客户多次咨询只计算一个客户 |
| 58 | + */ |
| 59 | + @SerializedName("user_cnt") |
| 60 | + private Integer customerCnt; |
| 61 | + |
| 62 | + /** |
| 63 | + * 咨询消息总数。客户在会话中发送的消息的数量 |
| 64 | + */ |
| 65 | + @SerializedName("customer_msg_cnt") |
| 66 | + private Integer customerMsgCnt; |
| 67 | + |
| 68 | + /** |
| 69 | + * 升级服务客户数。通过「升级服务」功能成功添加专员或加入客户群的客户数,若同一个客户添加多个专员或客户群,只计算一个客户。在2022年3月10日以后才会有对应统计数据 |
| 70 | + */ |
| 71 | + @SerializedName("upgrade_service_customer_cnt") |
| 72 | + private Integer upgradeServiceCustomerCnt; |
| 73 | + |
| 74 | + /** |
| 75 | + * 智能回复会话数。客户发过消息并分配给智能助手的咨询会话数。通过API发消息或者开启智能回复功能会将客户分配给智能助手 |
| 76 | + */ |
| 77 | + @SerializedName("ai_transfer_rate") |
| 78 | + private Integer aiSessionReplyCnt; |
| 79 | + |
| 80 | + /** |
| 81 | + * 转人工率。一个自然日内,客户给智能助手发消息的会话中,转人工的会话的占比。 |
| 82 | + */ |
| 83 | + @SerializedName("ai_transfer_rate") |
| 84 | + private Integer aiTransferRate; |
| 85 | + |
| 86 | + /** |
| 87 | + * 知识命中率。一个自然日内,客户给智能助手发送的消息中,命中知识库的占比。只有在开启了智能回复原生功能并配置了知识库的情况下,才会产生该项统计数据。当api托管了会话分配,智能回复原生功能失效。若不返回,代表没有向配置知识库的智能接待助手发送消息,该项无法计算 |
| 88 | + */ |
| 89 | + @SerializedName("ai_knowledge_hit_rate") |
| 90 | + private Integer aiKnowledgeHitRate; |
| 91 | + } |
| 92 | + |
| 93 | + public static WxCpKfGetCorpStatisticResp fromJson(String json) { |
| 94 | + return WxCpGsonBuilder.create().fromJson(json, WxCpKfGetCorpStatisticResp.class); |
| 95 | + } |
| 96 | +} |
0 commit comments