specifically I'm writing a restlet that will take a phone number as input and, search for contacts with that phone number, filtered by wether they're the primary ordering contact (custom checkbox), or if they have the string 'ordering' in their role, or just take the first contact with that phone number if neither of those is true, then return the customer record and the last order by the customer that contact is connected to.