Finely dice the shallot and pickled cucumbers. Pluck the parsley leaves from the stems and chop finely. Mix with the mayonnaise to make the tartar sauce.
Slice the tomatoes. Halve the baguette lengthwise. Brush both cut surfaces with tartar sauce. Layer tomatoes, ham, and cheese on the bottom half. Place the top half on top.
Bake at 220°C / 425°F (or 200°C / 400°F with fan) for 8 minutes until the cheese melts. Cut into 4 equal pieces.