Add cranberry juice, orange juice, agave or simple syrup, lime juice, tequila, and orange liqueur to a cocktail shaker half-filled with ice and shake well for at least 10 seconds.
To rim glasses: cut a slit in a lime or orange slice and run it around the edge of the glass. Add salt and sugar (or one or the other) to a small plate and stir well. Dip the edge of the glass in the salt mixture to coat.
Strain the cocktail into the glass (ice optional). Garnish with sugared cranberries, a rosemary sprig and/or orange slices.