In a blender or food processor, combine the tomatoes, onion, shallot, vinegar, brown sugar, mustard, allspice, cinnamon, mace, ginger, cloves, and red pepper flakes. Blend until puréed.
Pour the mixture into the slow cooker.
Cover and cook on HIGH for about 2-1/2 hours. Stir and scrape down the sides every 30 minutes or so.
Remove the lid and continue to cook the ketchup on HIGH, stirring and scraping down the sides regularly, for about another hour or until the ketchup is the consistency you want.
Season with salt and pepper to taste, stir, then turn off the slow cooker and let the ketchup cool to room temperature in the pot.
Scrape into a glass jar for easy storage.