# Customer Service Messages
# Use customer service messages on the page
Need to set the value of the button componentopen-typetocontact, when the user clicks it will enter the customer service session. If the user clicks the Weixin Mini Program message in the session,This returns to the Mini Program, where the developer can obtain the page path of the user's clicked message bybindcontactevent callbackpathand corresponding parameters [[TAG-4-Start]]query。
# sample code
<button open-type="contact" bindcontact="handleContact"></button>
Page({
handleContact (e) {
console.log(e.detail.path)
console.log(e.detail.query)
}
})
# Return parameter explaination
| parameter | type | Introductions |
|---|---|---|
| path | String | Path specified by Weixin Mini Program message |
| query | Object | Query parameter specified by Weixin Mini Program message |
# Access messaging services in the background
When the user sends a message to Weixin Mini Program customer service, or enters a session, etc., the developer fills out the server configurationURL / Cloud Dev Cloud Functions / Cloud-hosted services will receive messages and events pushed by WeChat servers that developers can respond to according to their business logic.For access and usage, please refer to Message Push .