|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* This file is part of the mucts.com. |
|
4
|
|
|
* |
|
5
|
|
|
* This source file is subject to the MIT license that is bundled |
|
6
|
|
|
* with this source code in the file LICENSE. |
|
7
|
|
|
* |
|
8
|
|
|
* @version 1.0 |
|
9
|
|
|
* @author herry<[email protected]> |
|
10
|
|
|
* @copyright © 2020 MuCTS.com All Rights Reserved. |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace MuCTS\Sobot\Tickets; |
|
14
|
|
|
|
|
15
|
|
|
|
|
16
|
|
|
use MuCTS\Sobot\Contracts\Sobot; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Class SaveAgentTicket |
|
20
|
|
|
* 创建工单(坐席) |
|
21
|
|
|
* |
|
22
|
|
|
* 备注: |
|
23
|
|
|
* 1、此处所传工单自定义字段,必须是所传工单分类id关联工单模板中的自定义字段。 |
|
24
|
|
|
* 2、分类关联模板中的自定义字段通过“查询工单分类关联的工单模板信息“接口获取。 |
|
25
|
|
|
* 3、工单分类ID需要调用“查询数据字典”中工单分类获取具体值。 |
|
26
|
|
|
* 4、如需上传附件,需要调用“附件上传(坐席)”进行。 |
|
27
|
|
|
* |
|
28
|
|
|
* @property-write string $companyid 企业ID |
|
29
|
|
|
* @property-write string $ticket_title 工单标题 |
|
30
|
|
|
* @property-write string $userid 客户ID |
|
31
|
|
|
* @property-write string $ticket_content 工单问题描述 |
|
32
|
|
|
* @property-write int $ticket_from 工单来源,1 PC客户留言,2 H5客户留言,3 微信公众号客户留言,4 APP客户留言,12 邮件留言,13语音留言,16微信小程序客户留言,17企业微信客户留言 |
|
33
|
|
|
* @property-write string $deal_groupid 受理技能组ID |
|
34
|
|
|
* @property-write string $deal_group_name 受理技能组名称 |
|
35
|
|
|
* @property-write string $deal_agentid 受理坐席ID |
|
36
|
|
|
* @property-write string $deal_agent_name 受理坐席名称 |
|
37
|
|
|
* @property-write string $create_agentid 创建坐席ID |
|
38
|
|
|
* @property-write string $create_agent_name 创建坐席名称 |
|
39
|
|
|
* @property-write string $recordid 记录ID,呼叫记录ID或会话记录ID |
|
40
|
|
|
* @property-write int $ticket_status 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除 |
|
41
|
|
|
* @property-write int $ticket_level 工单优先级,0低,1中,2高,3紧急 |
|
42
|
|
|
* @property-write string $ticket_typeid 工单分类ID,叶子节点的分类ID |
|
43
|
|
|
* @property-write string $file_str 附件路径,多个附件,附件之间采用英文分号";"隔开 |
|
44
|
|
|
* @property-write array $copy_agent 抄送坐席,格式:[["agent_name"=>"坐席名称","agent_mail"=>"坐席邮箱"]] |
|
45
|
|
|
* @property-write array $extend_fields 工单自定义字段信息,格式:[["fieldid"=>"自定义字段ID","field_value"=>"自定义字段值"]] |
|
46
|
|
|
* |
|
47
|
|
|
* @method SaveAgentTicket companyid(string $companyid) 企业ID |
|
48
|
|
|
* @method SaveAgentTicket ticketTitle(string $ticketTitle) 工单标题 |
|
49
|
|
|
* @method SaveAgentTicket userid(string $userid) 客户ID |
|
50
|
|
|
* @method SaveAgentTicket ticketContent(string $ticketContent) 工单问题描述 |
|
51
|
|
|
* @method SaveAgentTicket ticketFrom(string $ticketFrom) 工单来源,1 PC客户留言,2 H5客户留言,3 微信公众号客户留言,4 APP客户留言,12 邮件留言,13语音留言,16微信小程序客户留言,17企业微信客户留言 |
|
52
|
|
|
* @method SaveAgentTicket dealGroupid(string $dealGroupid) 受理技能组ID |
|
53
|
|
|
* @method SaveAgentTicket dealGroupName(string $dealGroupName) 受理技能组名称 |
|
54
|
|
|
* @method SaveAgentTicket dealAgentid(string $dealAgentid) 受理坐席ID |
|
55
|
|
|
* @method SaveAgentTicket dealAgentName(string $dealAgentName) 受理坐席名称 |
|
56
|
|
|
* @method SaveAgentTicket createAgentid(string $createAgentid) 创建坐席ID |
|
57
|
|
|
* @method SaveAgentTicket createAgentName(string $createAgentName) 创建坐席名称 |
|
58
|
|
|
* @method SaveAgentTicket recordid(string $recordid) 记录ID,呼叫记录ID或会话记录ID |
|
59
|
|
|
* @method SaveAgentTicket ticketStatus(int $ticketStatus) 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除 |
|
60
|
|
|
* @method SaveAgentTicket ticketLevel(int $ticketLevel) 工单优先级,0低,1中,2高,3紧急 |
|
61
|
|
|
* @method SaveAgentTicket ticketTypeid(string $ticketTypeid) 工单分类ID,叶子节点的分类ID |
|
62
|
|
|
* @method SaveAgentTicket fileStr(string $fileStr) 附件路径,多个附件,附件之间采用英文分号";"隔开 |
|
63
|
|
|
* @method SaveAgentTicket copyAgent(array $copyAgent) 抄送坐席,格式:[["agent_name"=>"坐席名称","agent_mail"=>"坐席邮箱"]] |
|
64
|
|
|
* @method SaveAgentTicket pushCopyAgentItem(string $agentName,string $agentMail) 追加抄送坐席项 |
|
65
|
|
|
* @method SaveAgentTicket extendFields(array $extendFields) 工单自定义字段信息,格式:[["fieldid"=>"自定义字段ID","field_value"=>"自定义字段值"]] |
|
66
|
|
|
* @method SaveAgentTicket pushExtendFieldsItem(string $fieldid, string $fieldValue) 追加工单自定义字段信息项 |
|
67
|
|
|
* @package MuCTS\Sobot\Tickets |
|
68
|
|
|
*/ |
|
69
|
|
|
class SaveAgentTicket extends Sobot |
|
70
|
|
|
{ |
|
71
|
|
|
|
|
72
|
|
|
public function getRequestMethod(): string |
|
73
|
|
|
{ |
|
74
|
|
|
return self::METHOD_POST; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
public function getRequestPath(): string |
|
78
|
|
|
{ |
|
79
|
|
|
return '/api/ws/5/ticket/save_agent_ticket'; |
|
80
|
|
|
} |
|
81
|
|
|
} |