Documentation ¶
Overview ¶
Package customer_message 客户联系/消息推送
Index ¶
- func AddMsgTemplate(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GetGroupmsgList(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GetGroupmsgSendResult(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GetGroupmsgTask(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GroupWelcomeTemplateAdd(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GroupWelcomeTemplateDel(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GroupWelcomeTemplateEdit(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GroupWelcomeTemplateGet(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func SendWelcomeMsg(ctx *corporation.App, payload []byte) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMsgTemplate ¶
func AddMsgTemplate(ctx *corporation.App, payload []byte) (resp []byte, err error)
创建企业群发
企业跟第三方应用可通过此接口添加企业群发消息的任务并通知成员发送给相关客户或客户群。(注:企业微信终端需升级到2.7.5版本及以上)注意:调用该接口并不会直接发送消息给客户/客户群,需要成员确认后才会执行发送(客服人员的企业微信需要升级到2.7.5及以上版本)同一个企业每个自然月内仅可针对一个客户/客户群发送4条消息,超过接收上限的客户将无法再收到群发消息。
See: https://work.weixin.qq.com/api/doc/90000/90135/92135
POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.AddMsgTemplate(ctx, payload) fmt.Println(resp, err) }
Output:
func GetGroupmsgList ¶
func GetGroupmsgList(ctx *corporation.App, payload []byte) (resp []byte, err error)
获取群发记录列表
企业和第三方应用可通过此接口获取企业与成员的群发记录。
See: https://work.weixin.qq.com/api/doc/90000/90135/93338
POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_groupmsg_list?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GetGroupmsgList(ctx, payload) fmt.Println(resp, err) }
Output:
func GetGroupmsgSendResult ¶
func GetGroupmsgSendResult(ctx *corporation.App, payload []byte) (resp []byte, err error)
获取企业的全部群发记录
See: https://work.weixin.qq.com/api/doc/90000/90135/93338
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GetGroupmsgSendResult(ctx, payload) fmt.Println(resp, err) }
Output:
func GetGroupmsgTask ¶
func GetGroupmsgTask(ctx *corporation.App, payload []byte) (resp []byte, err error)
获取企业的全部群发记录
See: https://work.weixin.qq.com/api/doc/90000/90135/93338
POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_groupmsg_task?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GetGroupmsgTask(ctx, payload) fmt.Println(resp, err) }
Output:
func GroupWelcomeTemplateAdd ¶
func GroupWelcomeTemplateAdd(ctx *corporation.App, payload []byte) (resp []byte, err error)
添加入群欢迎语素材
企业可通过此API向企业的入群欢迎语素材库中添加素材。每个企业的入群欢迎语素材库中,最多容纳100个素材。
See: https://work.weixin.qq.com/api/doc/90000/90135/92366
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GroupWelcomeTemplateAdd(ctx, payload) fmt.Println(resp, err) }
Output:
func GroupWelcomeTemplateDel ¶
func GroupWelcomeTemplateDel(ctx *corporation.App, payload []byte) (resp []byte, err error)
删除入群欢迎语素材
企业可通过此API删除入群欢迎语素材,且仅能删除调用方自己创建的入群欢迎语素材。
See: https://work.weixin.qq.com/api/doc/90000/90135/92366
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GroupWelcomeTemplateDel(ctx, payload) fmt.Println(resp, err) }
Output:
func GroupWelcomeTemplateEdit ¶
func GroupWelcomeTemplateEdit(ctx *corporation.App, payload []byte) (resp []byte, err error)
编辑入群欢迎语素材
企业可通过此API编辑入群欢迎语素材库中的素材,且仅能够编辑调用方自己创建的入群欢迎语素材。
See: https://work.weixin.qq.com/api/doc/90000/90135/92366
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GroupWelcomeTemplateEdit(ctx, payload) fmt.Println(resp, err) }
Output:
func GroupWelcomeTemplateGet ¶
func GroupWelcomeTemplateGet(ctx *corporation.App, payload []byte) (resp []byte, err error)
获取入群欢迎语素材
企业可通过此API获取入群欢迎语素材。
See: https://work.weixin.qq.com/api/doc/90000/90135/92366
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.GroupWelcomeTemplateGet(ctx, payload) fmt.Println(resp, err) }
Output:
func SendWelcomeMsg ¶
func SendWelcomeMsg(ctx *corporation.App, payload []byte) (resp []byte, err error)
发送新客户欢迎语
See: https://work.weixin.qq.com/api/doc/90000/90135/92137
POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/send_welcome_msg?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/external_contact/customer_message" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := customer_message.SendWelcomeMsg(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.