7x9小时
9:00am - 6:00pm
免费售前热线
13338363507
商家登录
顾客类接口
2025-04-02
公开
/**
* 获取顾客的详细信息
* openId,wxappid(这两个参数在授权域名共享的回调时会提供)
*
* @param [type] $openId 该顾客的openId
*
* 成功返回示例:
{
errNum: 0, // 0代表请求正确返回
customerInfo: {
id: 6, // 顾客id
status: 1 // 1:关注 2:取消关注
headImg: 'xxxx.jpg', // 顾客头像 (获取到头像后请保存至第三方开发者的服务器,使用第三方域名访问图片)
name: 'xxx', // 顾客名字
tel: '138****1786' // 顾客电话(如果有的话说明已经注册)
}
}
*/
public function getcustomerinfo($openId, $wxappId)/** * 用cusId获取顾客信息 * @param [type] $cusId 顾客id * @return [type] * 返回顾客信息的字段: id : ID, name : 名字, telnum : 已认证电话, telnum1 : 未认证电话, birthday : 生日, sex : 性别(1:男,2:女), description : 额外描述, wxLastOpTime : 微信上最近一次交互的时间, uid : 渠道人员id, channelId : 渠道媒介, consultId : 现场咨询师id, firstPreConsultId : 专属线上咨询师, preConsultId : 线上咨询id, intention : 顾客意向度, isBigOrder : 是否是大单, points : 金币, commission : 佣金, gold : 顾客余额, storedPrincipal: 储值本金, storedGive: 储值赠送, headimg : 头像地址, model : 0: 公众号聊天 1:网页在线聊天 2:小程序聊天 channel : 媒介的具体信息 user: 渠道人员的具体信息 firstpreconsult: 专属咨询师的具体信息 preconsult: 线上咨询师的具体信息 consult: 现场咨询师的具体信息 wxScenesBind: 关注的公众号 */ public function getCusInfoByCusId($cusId)
/** * 用顾客手机号获取顾客信息 * @param [type] $telnum 顾客手机号 * @return [type] * 返回顾客信息的字段: * 和getCusInfoByCusId()接口返回的结构一致 */ public function getCusInfoByCusTelnum($telnum)
/**
* 在系统里新建一个顾客
* @param [type] $name 必填:顾客名称
* @param [type] $telnum 必填:顾客手机号(唯一)
*
* @param [type] $erpId 选填:指定会员id (数字,不超过11位,唯一)
* @param [type] $uuid 选填:外部id (不超过32位,唯一)
* @param integer $sex 选填:顾客性别:(1:男,2:女)
* @param [type] $birthday 选填:生日 Y-m-d
* @param [type] $province 选填:-省份-城市-区县 eg: -辽宁省-锦州-黑山县
*
* @param [type] $channelName 选填:渠道名称(和系统内保持一致,系统内没有的时候会新建)
* @param string $channelUserName 选填:渠道人员名称(和系统内保持一致,系统内没有的时候会新建)
* @param string $preConsultName 选填:网电人员名字(和系统内保持一致,系统内没有的时候会新建)
* @param string $ownerName 选填:建档人员名字(和系统内保持一致,系统内没有的时候会新建)
* @param string $description 选填:网电备注(和系统内保持一致,系统内没有的时候会新建)
* @param string $teamId 选填:该顾客所属分店的id
* @return [type]
{
errNum: xx(0说明接口返回成功,非0说明是产生了错误),
errMsg: errNum为非0时会带上这个错误信息
}
*/
public function actionAddcustomer($name, $telnum, $erpId = null, $sex = 0, $birthday = null, $channelName = null, $channelUserName = '', $preConsultName = '', $ownerName = '', $description = '', $uuid = null, $province = null, $teamId = null){ /**
* 创建一个预约记录
* @param [type] $cusId 顾客id
* @param [type] $teamId 所在的企业id
* @param [type] $telnum 顾客手机号(顾客id 和 顾客手机号至少填写一个)
* @param string $type 0: 到店预约(员工新增在线预约),3: 到店预约(员工新增店内预约), 1:手术预约,2:到店预约(顾客在线预约)
* @param string $content 预约内容
* @param string $comment 预约备注
* @param [type] $appointmentTime 预约时间-开始时间(只预约一个时间时使用该字段)
* @param [type] $appointmentTime1 预约时间-结束时间
* @param [type] $pId 预约的项目(多个的话可以用,分隔)
* @param [type] $doctorId 手术排台时预约的工作人员 (此时type需为1)
* @param [type] $technicianId 服务的技师id / 服务的设备id
*
* @return [type] 返回示例:
{
errNum: 0,
appointmentId: 198
}
*/
public function addOneAppointment($cusId = null, $telnum = null, $type = 2, $teamId = null, $content = '', $comment = '', $appointmentTime, $appointmentTime1 = null, $pId, $doctorId = null, $technicianId = null) /**
* 修改一个预约记录
* @param [type] $id 需修改的预约记录的id
* @param [type] $teamId 所在的企业id
* @param string $type 0: 到店预约(员工新增在线预约),3: 到店预约(员工新增店内预约), 1:手术预约,2:到店预约(顾客在线预约)
* @param string $content 预约内容
* @param string $comment 预约备注
* @param [type] $appointmentTime 预约时间-开始时间(只预约一个时间时使用该字段)
* @param [type] $appointmentTime1 预约时间-结束时间
* @param [type] $pId 预约的项目(多个的话可以用,分隔)
* @param [type] $doctorId 手术排台时预约的工作人员 (此时type需为1)
* @param [type] $technicianId 服务的技师id / 服务的设备id
*
* @return [type] 返回示例:
{
errNum: 0
}
*/
public function changeOneAppointment($id, $teamId = null, $type = 2, $content = '', $comment = '', $appointmentTime = null, $appointmentTime1 = null, $pId = null, $doctorId = null, $technicianId = null)
/**
* 取消一个预约记录
* @param [type] $id 需取消的预约记录的id
* @param string $comment 取消预约的备注
*
* @return [type] 返回示例:
{
errNum: 0
}
*/
public function cancelOneAppointment($id, $comment = '') /**
* 获取预约列表(一般用于按时间顺序增量拉取预约或者完成预约的记录)
* @param [type] $lastCreateTime 从该“创建预约时间”开始获取预约列表(结果按创建时间排序,不填则不返回结果)
* @param [type] $lastCompleteTime 从该“完成预约时间”开始获取预约列表(结果按完成预约时间排序,不填则不返回结果)
* @param [type] $lastAppointTime 从该“预约时间”开始获取预约列表(结果按预约时间排序,不填则不返回结果)
* @param [type] $lastCancelTime 从该“取消时间”开始获取已取消的预约列表(结果按取消预约时间排序,不填则不返回结果)
* @param [type] $cusId 只获取指定顾客的记录
* @return [type] 返回示例:
{
errNum: 0,
createTotal: "1",
createList: [
{
id: "898",
teamId: "demo",
cusId: "13510",
uId: "10107",
comment: "备注",
content: "韩式三点双眼皮2",
createTime: "2022-01-04 10:23:14",
appointmentTime: "2022-01-04 14:30:00",
appointmentTime1: null,
cancelTime: null,
completeTime: "2022-01-04 10:25:16",
type: "3",
doctorId: null,
pId: null
}
],
completeTotal: "1",
completeList: [
{
id: "931",
teamId: "demo",
cusId: "13552",
uId: "10107",
comment: "预约备注",
content: "全身白瓷3次 韩式三点双眼皮1",
createTime: "2022-02-09 16:40:22",
appointmentTime: "2022-02-09 18:30:00",
appointmentTime1: null,
cancelTime: null,
completeTime: "2022-02-09 16:41:06",
type: "3",
doctorId: null,
pId: null
}
],
appointmentTotal: "0",
appointmentList: [
]
,
cancelTotal: "0",
cancelList: [
]
}
*/
public function getAppointmentList($lastCreateTime = null, $lastCompleteTime = null, $lastAppointTime = null, $cusId = null)
↓扫码添加
企雀顾问↓
↑了解更多数智场景↑
有用
没用
分享到微信
小程序内打开
打开微信“扫一扫”转发给朋友
打开微信“扫一扫”在小程序中打开
关闭预览
账号登录


