文档中心 > API类目 > 瓴羊客服云

alibaba.lyservice.lippi.event.change (事件变更接口)

客服域的事件变更时,通知钉钉客服 dingtalk.oapi.customerservice.event.change

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ly_ding_open_para_dto LyDingOpenParaDTO 必须 开放平台默认参数
  • └ isv_org_id
  • Number
  • 可选
  • 0
  • 当tokenGrantType=1时,isvOrgId才会被赋值,此值表示调用方是ISV时,ISV在钉钉上的企业ID
  • └ corp_id
  • String
  • 可选
  • dingxx
  • 表示当前token所属的企业对外开放的ID
  • └ token_grant_type
  • Number
  • 可选
  • 0
  • 0为证书类型,表示当前token是企业自己的,本次调用方是企业;1为授权类型,表示当前token是企业授权给ISV的,本次调用方是ISV
  • └ suite_key
  • String
  • 可选
  • xx
  • tokenGrantType=1时,suiteKey才会被赋值
  • └ org_id
  • Number
  • 可选
  • 123
  • 表示当前token所属的企业ID
ly_event_dto LyEventDTO 必须 事件对象
  • └ event_code
  • String
  • 必须
  • caseTaskStatusChange
  • 事件code,参考com.dingtalk.customerservice.common.EventBizTypeEnum
  • └ event_id
  • String
  • 必须
  • 12345
  • 事件的唯一性id,用于幂等
  • └ biz_type
  • String
  • 必须
  • case
  • 事件业务类型,参考com.dingtalk.customerservice.common.EventBizTypeEnum
  • └ open_instance_id
  • String
  • 可选
  • shop001
  • 实例id
  • └ ding_corp_id
  • String
  • 可选
  • dingxxx
  • 钉钉corpId
  • └ production_type
  • Number
  • 可选
  • 1
  • 1,智能客服;1001,经济体版本
  • └ source
  • String
  • 必须
  • XSpace
  • 事件来源,com.dingtalk.customerservice.common.SourceEnum
  • └ event_body
  • String
  • 必须
  • {"caseId":123,"taskId":321,"caseName":"工单名称","taskName":"任务名称","serviceId":"testServiceId"}
  • 事件变更内容,json格式
  • └ bu_id
  • String
  • 必须
  • 100
  • buId(租户id)

响应参数

名称 类型 示例值 描述
result ResultDO 结果
  • └ msg
  • String
  • SYSTEM_ERROR
  • 错误信息
  • └ code
  • String
  • 400001
  • 错误码
  • └ success
  • Boolean
  • false
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaLyserviceLippiEventChangeRequest req = new AlibabaLyserviceLippiEventChangeRequest();
AlibabaLyserviceLippiEventChangeRequest.LyDingOpenParaDTO obj1 = new AlibabaLyserviceLippiEventChangeRequest.LyDingOpenParaDTO();
obj1.setIsvOrgId(0L);
obj1.setCorpId("dingxx");
obj1.setTokenGrantType(0L);
obj1.setSuiteKey("xx");
obj1.setOrgId(123L);
req.setLyDingOpenParaDto(obj1);
AlibabaLyserviceLippiEventChangeRequest.LyEventDTO obj2 = new AlibabaLyserviceLippiEventChangeRequest.LyEventDTO();
obj2.setEventCode("caseTaskStatusChange");
obj2.setEventId("12345");
obj2.setBizType("case");
obj2.setOpenInstanceId("shop001");
obj2.setDingCorpId("dingxxx");
obj2.setProductionType(1L);
obj2.setSource("XSpace");
obj2.setEventBody("{\"caseId\":123,\"taskId\":321,\"caseName\":\"工单名称\",\"taskName\":\"任务名称\",\"serviceId\":\"testServiceId\"}");
obj2.setBuId("100");
req.setLyEventDto(obj2);
AlibabaLyserviceLippiEventChangeResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_lyservice_lippi_event_change_response>
    <result>
        <msg>SYSTEM_ERROR</msg>
        <code>400001</code>
        <success>false</success>
    </result>
</alibaba_lyservice_lippi_event_change_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部