Display a customer's points program activity
Display a list of points program activity to a logged-in customer.
<h3>Points Program Activity</h3>
<div>
<ul id="points-program-activity"></ul>
</div>
<script type="text/javascript">
document.addEventListener('rivo-js-loaded', function() {
const activityList = document.getElementById("points-program-activity");
window.RivoJS.getCustomerPointsLogs().then(function(data){
data.points_logs.forEach(function(pointsLog){
let li = document.createElement("li");
li.innerText = `${pointsLog.external_note}: ${pointsLog.points_amount}`;
activityList.appendChild(li);
});
});
});
</script>
Updated over 1 year ago