docs/src/4.x/official-account/customer_service.md
使用客服系统可以向用户发送消息以及群发消息,客服的管理等功能。
$app->customer_service->list();
$app->customer_service->online();
$app->customer_service->create('foo@test', '客服1');
$app->customer_service->update('foo@test', '客服1');
$app->customer_service->delete('foo@test');
$app->customer_service->setAvatar('foo@test', $avatarPath); // $avatarPath 为本地图片路径,非 URL
$app->customer_service->messages($startTime, $endTime, $msgId = 1, $number = 10000);
示例:
$records = $app->customer_service->messages('2015-06-07', '2015-06-21', 1, 20000);
$app->customer_service->message($message)->to($openId)->send();
$message为消息对象或文本,请参考:消息
示例:
$app->customer_service->message('hello')
> ->to('oV-gpwdOIwSI958m9osAhGBFxxxx')
> ->send();
$app->customer_service->message($message)
> ->from('account@test')
> ->to($openId)
> ->send();
$message为消息对象或文本,请参考:消息
示例:
$app->customer_service->message('hello')
> ->from('kf2001@gh_176331xxxx')
> ->to('oV-gpwdOIwSI958m9osAhGBFxxxx')
> ->send();
以账号 foo@test 邀请 微信号 为 xxxx 的微信用户加入客服。
$app->customer_service->invite('foo@test', 'xxxx');
$app->customer_service_session->create('test1@test', 'OPENID');
$app->customer_service_session->close('test1@test', 'OPENID');
$app->customer_service_session->get('OPENID');
$app->customer_service_session->list('test1@test');
$app->customer_service_session->waiting();