First you have to go to in your merchant panel to Affiliates > Affiliate manager where you have to create a filter.
Give it a name and save it. Now refresh the browser and you can use this filter when composing an email at Emails > Send message and selecting the Recipients.