customer

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: 3 Imported by: 0

Documentation

Overview

Package customer 客户联系/客户管理

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx *corporation.App, params url.Values) (resp []byte, err error)

获取客户详情

企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。

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

GET https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID

Example
package main

import (
	"fmt"
	"net/url"

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

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := customer.Get(ctx, params)

	fmt.Println(resp, err)
}
Output:

func GetByUser

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

批量获取客户详情

企业/第三方可通过此接口获取指定成员添加的客户信息列表。

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

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

Example
package main

import (
	"fmt"

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

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetMobileHashcode

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

获取手机号随机串

支持企业获取手机号随机串,该随机串可直接在企业微信终端搜索手机号对应的微信用户。

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

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

Example
package main

import (
	"fmt"

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

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func List

func List(ctx *corporation.App, params url.Values) (resp []byte, err error)

获取客户列表

企业可通过此接口获取指定成员添加的客户列表。客户是指配置了客户联系功能的成员所添加的外部联系人。没有配置客户联系功能的成员,所添加的外部联系人将不会作为客户返回。

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

GET https://qyapi.weixin.qq.com/cgi-bin/externalcontact/list?access_token=ACCESS_TOKEN&userid=USERID

Example
package main

import (
	"fmt"
	"net/url"

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

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := customer.List(ctx, params)

	fmt.Println(resp, err)
}
Output:

func Remark

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

修改客户备注信息

企业可通过此接口修改指定用户添加的客户的备注信息。

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

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

Example
package main

import (
	"fmt"

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

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := customer.Remark(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