Category: CRM and lead management

CRM Lead Count Does Not Match the Visible List

Read this guide in Polish

The panel shows 180 contacts, but the sales representative sees only part. The reason is the difference between the way records are counted and the filters and list permissions.

Why is this happening?

The counter can come from a different query than the list: include the archive, do not use filters, use a different range of RLS, or count all records despite pagination. First figure out exactly what the number represents.

Step by step solution

1. Save the role, user login ID, active tab and filters. Compare the same conditions in the counter and leaves.

2 . Disable search, status filter, hiding locked and archive. See if the list recovers the missing positions.

3 . Examine pagination: Does the interface only download the first 50 or 100 records and the numerator shows all? Check the following pages and limit the API response.

4 . Compare the request count with the list request, including the conditions for assigning the sales representative and RLS policy. Do not circumvent RLS key service roles in your browser.

5 . Add integration test: a sales representative, manager and administrator account sees the right records and a consistent counter at the same filter.

How do I check the score?

After passing all pages, the sum of visible records for a particular filter agrees with the numerator. Separately verify the total number in the database, because it may have a different range.

Do not correct the problem by replacing the counter with the first page length. It hides the difference instead of fixing the visibility rules.