Loading…

Custom script

Table of contents on this page
# Give out coupons based on user points ranking ```json [ { cmd: "score-rank-send-coupons", rankMod: 0, version: 1, rankMin: 1, rankMax: 2, couponRuleId: 1234, number: 6 } ] ``` + cmd fixed to score-rank-send-coupons +rankMod 0 means to get the current points ranking list; 1 means to get the previous round of points ranking list. + version is fixed to 1 + rankMin and rankMax represent the ranking range For example, [rankMin:1, rankMax:1] represents the first place; For example, [rankMin:2, rankMax:6] represents the 2nd, 3rd, 4th, 5th, and 6th places; + couponRuleId The coupon rule ID given + number Give away several coupons Schematic diagram of coupon rule ID: ![](https://dcdn.it120.cc/yuque/0/2020/png/572726/1606571670998-a8ab2f67-9e78-4a40-80b5-d632315154e4.png) If you want to give away other coupons at the same time, the above script is an array and you can add multiple sets of coupons.