A type is an apartment, house, room, yurt....
A style is standard, executive, deluxe, Honey Moon....
Is an exact match available (type, style, beds).
Is an exact bed match available with the same or better style (same type, better style, same number of beds).
Is a match using zippables available with the same or better style (same type, better style, same beds using zips).
Is a match available, with different bed config with the same or better style (same type, better style, same number of guests in room).
Are there any rooms with the same type that will take the number of guests? Pick the room that wastes the least number of beds. Put the booking here (same type, better style, too many beds for the guests) .
Make sure to sort the styles if you want upgrading between styles.
Turn off the setting to allow upgrading styles if you never want a booking to get a better style.
If you want to allow upgrading styles, but only between certain styles, consider using types instead of styles.
A booking will never be placed in a different type.