---
updatedAt: 2025-05-27T21:14:10.000Z
agentTools:
  projectIndex: https://developer-docs.rivo.io/llms.txt
---

# Update a customer's points total

Get the logged in customer's details and update their points in a DOM element.

```javascript JavaScript
<script type="text/javascript">
  document.addEventListener("rivo-js-loaded", function() {
    if (window.Rivo?.common?.customer) {
      RivoJS.getCustomerDetails().then(function(resp) {
        if (resp.pretty_points_tally) {
          document.querySelector(".rivo-points-total").innerHTML = resp.pretty_points_tally;
        }
      })
    }
  });
</script>
```