There are (at least) two ways to make such a microflow:
In a Data Grid of Customer entities, add a microflow to the control bar. This microflow has a single input parameter of type Customer. In an exclusive split, you can check if this Customer object has the proper attribute value ($Customer/Attribute = modulename.enumerationname.enumerationvalue). If you, delete the object, if not show a message to the user.
You can place a microflow trigger anywhere for a microflow that has no inputs. Then, you use a Retrieve action to retrieve Customer objects, with an XPath constraint, like [attribute = 'enumerationvalue']. Then you add a delete action which deletes all of the retrieved objects.
Remember that you have auto complete if you press ctrl + space, to help you get the syntax right.
Are you sure that the other options of your exclusive splits DON'T delete the customer? Should probably look something like this:
"But I don't know how to retrieve a list of customers only with a specific attribute value."
Use an xpath constraint on the attribute (see https://world.mendix.com/display/refguide4/XPath+Constraints)
Here you see the picture(link) of my microflow. I think the problem is that the microflow now deletes a random customer instead of that customer with the specific value . http://postimg.org/image/5mp8x6ldn/
I want to do the second method, without any inputs. I made an microflow that retrieves the list of customers with this attribute value, but in the delete activity I have to choose a variable which is not available now(I only retrieve a list of the customer). How can I solve this problem?