You have to set imports and exports from the city screens and then assign the wagon to that route.
For instance, set York to export food, set Lexington to import food, then when you click automation on the wagon train, it will show a checkbox menu with "Food from York to Lexington".