Scan event push
Scan event push
If the WeChat server does not receive a response within five seconds, it will disconnect and reinitiate the request, retrying three times in total. Regarding retrying message duplication, it is recommended to use FromUserName CreateTime to deduplicate messages. If the server cannot guarantee to process and reply within five seconds, you can directly reply with an empty string. The WeChat server will not do anything with this and will not initiate a retry.
Open the product homepage event push
When the user opens the product homepage, whether by scanning the QR code or from other sources When the scene (conversation, collection or circle of friends) is opened, WeChat will push the event to the URL filled in by the merchant. The content pushed includes basic user information and code information corresponding to the product homepage.
Push XML example
<xml> <ToUserName><![CDATA[gh_4e47c9c9ecad]]></ToUserName> <FromUserName><![CDATA[okkeXs1nI-xU4ql8-5BXkv1f0gDo]]></FromUserName> <CreateTime>1438250110</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[user_scan_product]]></Event> <KeyStandard><![CDATA[ean13]]></KeyStandard> <KeyStr><![CDATA[6901481811083]]></KeyStr> <Country><![CDATA[中国]]></Country> <Province><![CDATA[广东]]></Province> <City><![CDATA[揭阳]]></City> <Sex>1</Sex> <Scene>2</Scene> <ExtInfo><![CDATA[123]]></ExtInfo> </xml>
Push parameter description
Parameters | Description |
---|---|
ToUserName | The original id of the merchant’s public account. |
FromUserName | The user’s openid. |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, user_scan_product is the event to open the product home page. |
KeyStandard | Commodity coding standard. |
KeyStr | Product code content. |
Country | The country set by the user in WeChat. |
Province | The province set by the user in WeChat. |
City | The city set by the user in WeChat. |
Sex | The user's gender, 1 is male, 2 is female, 0 means unknown. |
Scene | The scene to open the product homepage, 1 is for scanning the QR code, and 2 is for other opening scenes (such as conversation, collection or circle of friends). |
ExtInfo | The extinfo passed in when calling the "Get Product QR Code Interface" is the identification parameter. |
Follow the public account event push
When the user follows the public account on the product homepage, WeChat will push the event to the merchant to fill in URL. The content pushed includes the basic information, time, attention scenes and corresponding code information of the following users.
Push XML example
<xml> <ToUserName><![CDATA[gh_fbe8a958756e]]></ToUserName> <FromUserName><![CDATA[otAzGjrS4AYCmeJM1GhEOcHXXTAo]]></FromUserName> <CreateTime>1433259128</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[subscribe]]></Event> <EventKey><![CDATA[scene|keystandard|keystr|extinfo]></EventKey> </xml>
Push parameter description
Parameters | Description |
---|---|
ToUserName | The original id of the merchant’s public account. |
FromUserName | The user’s openid. |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, subscribe is to follow the official account event. |
EventKey | " segmentation. ①scene represents the scene: scanbarcode is the code scanning scene, scanimage is the cover (image) scanning scene. ②keystandard represents the product coding standard: barcode is the barcode . ③ keystr represents the product coding content. ④ extinfo represents the extinfo passed in when calling the "get product QR code interface", which is the identification parameter. |
Enter the official account event push
When the user enters the official account session from the product homepage, WeChat will push the event to the merchant Fill in the URL. The content pushed includes the user's basic information, time, scene of interest and corresponding barcode information.
Push XML example
<xml> <ToUserName><![CDATA[gh_fbe8a958756e]]></ToUserName> <FromUserName><![CDATA[otAzGjrS4AYCmeJM1GhEOcHXXTAo]]></FromUserName> <CreateTime>1433259128</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[user_scan_product_enter_session]]></Event> <KeyStandard><![CDATA[ena13]]></KeyStandard> <KeyStr><![CDATA[6954767461373]]></KeyStr> <ExtInfo><![CDATA[]]></ExtInfo> </xml>
Push parameter description
Parameters | Description |
---|---|
ToUserName | The original id of the merchant’s public account. |
FromUserName | The user’s openid. |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, user_scan_product_enter_session is the official account entry event. |
KeyStandard | Commodity coding standard. |
KeyStr | Product code content. |
ExtInfo | The extinfo passed in when calling the "Get Product QR Code Interface" is the identification parameter. |
Asynchronous push of geographical location information
When a user opens the product homepage, WeChat will asynchronously push the user’s real-time geographical location information The event form is pushed to the URL filled in by the merchant. Merchants can use this information for data analysis to form differentiated operation plans or guide production.
The geographical location information pushed is at the "province" level, such as Guangdong Province. Due to the user's network speed, the response speed of asynchronous push may be slower.
Push XML example
<xml> <ToUserName><![CDATA[gh_fbe8a958756e]]></ToUserName> <FromUserName><![CDATA[otAzGjrS4AYCmeJM1GhEOcHXXTAo]]></FromUserName> <CreateTime>1434541327</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[user_scan_product_async]]></Event> <KeyStandard><![CDATA[qrcode]]></KeyStandard> <KeyStr><![CDATA[lincolntest2]]></KeyStr> <ExtInfo><![CDATA[123]]></ExtInfo> <RegionCode><![CDATA[440105]]></RegionCode> </xml>
Push parameter description
Parameters | Description |
---|---|
ToUserName | The original id of the merchant’s public account. |
FromUserName | The user’s openid. |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, user_scan_product_async is an asynchronous event. |
KeyStandard | Commodity coding standard. |
KeyStr | Product code content. |
ExtInfo | The extinfo passed in when calling the "Get Product QR Code Interface" is the identification parameter. |
RegionCode | The user’s real-time geographical location information (currently only accurate to the provincial level), the corresponding details can be found on the National Bureau of Statistics website: http:// www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html |
Product review result push
#Submit the product for review. After the review is completed, WeChat will push the review results in the form of an event Go to the URL filled in by the merchant.
Push XML example
<xml> <ToUserName><![CDATA[gh_404e58ec528e]]></ToUserName> <FromUserName><![CDATA[od_ikt8qi21-hVTtYgm8xSfTLH5w]]></FromUserName> <CreateTime>1450429257</CreateTime> <MsgType><![CDATA[event]]></MsgType> <Event><![CDATA[user_scan_product_verify_action]]></Event> <KeyStandard><![CDATA[ean13]]></KeyStandard> <KeyStr><![CDATA[6901481811083]]></KeyStr> <Result><![CDATA[verify_ok]]></Result> <ReasonMsg><![CDATA[]]></ReasonMsg> </xml>
Push parameter description
Parameters | Description |
---|---|
ToUserName | The original id of the merchant’s public account. |
FromUserName | Scan the review system. |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, user_scan_product_verify_action is the audit result event. |
KeyStandard | Commodity coding standard. |
KeyStr | Product code content. |
Result | Review results. verify_ok means the audit passed, verify_not_pass means the audit failed. |
ReasonMsg | The reason why the review failed. |