customer_stat

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package customer_stat 客户联系/统计管理

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserBehaviorData

func GetUserBehaviorData(ctx *corporation.App, payload []byte) (resp []byte, err error)

获取「联系客户统计」数据

企业可通过此接口获取成员联系客户的数据,包括发起申请数、新增客户数、聊天数、发送消息数和删除/拉黑成员的客户数等指标。

See: https://work.weixin.qq.com/api/doc/90000/90135/92132

POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_user_behavior_data?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/external_contact/customer_stat"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := customer_stat.GetUserBehaviorData(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func Statistic

func Statistic(ctx *corporation.App, payload []byte) (resp []byte, err error)

获取「群聊数据统计」数据/按群主聚合的方式

See: https://work.weixin.qq.com/api/doc/90000/90135/92133

POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/statistic?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/external_contact/customer_stat"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := customer_stat.Statistic(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func StatisticGroupByDay

func StatisticGroupByDay(ctx *corporation.App, payload []byte) (resp []byte, err error)

获取「群聊数据统计」数据/按自然日聚合的方式

See: https://work.weixin.qq.com/api/doc/90000/90135/92133

POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/statistic_group_by_day?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/external_contact/customer_stat"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := customer_stat.StatisticGroupByDay(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL