Within the dashboards you can create and manage custom filters
Filters opens the Filter menu.

Click + to create a new Filter

The Edit Filter modal opens
Create the Filter. The Filter Name is used to identify the Filter within the query. Add the values and Save.

The names are used to identify the value from the dashboard interface.

When writing the query in SQL, you would use User against the column you want to filter. MySQL example:
select * from payments where [customer_id=User]
This query would generate the following when John A. is selected:
select * from payments where customer_id in (1241)
When choosing multiple custom filters

The generated query would be:
select * from payments where customer_id in (1241, 9321)
Using Mongo driver, would be a query like:
{ "find": "payments", "filter": { "customer_id": "[User]" } }
This would generate a query like:
{ "count": "payments", "query": { "customer_id": { "$in": [ 1241, 9321 ] } } }