Ross County have been drawn in the same group as Dundee United in the Betfred Cup, while Caley Thistle face a testing match against Hearts.
But perhaps the most intriguing match of the group stages will see Highland League champions Cove Rangers take on Cowdenbeath, the team that defeated them in the SPFL pyramid play-offs in controversial circumstances with the Aberdeen side having three players sent-off in a 3-2 defeat at Central Park.
The pair have been drawn in the Group C with Hearts, Caley Thistle and Raith Rovers.
Ross County and Dundee United will also take on Arbroath, Elgin City and Alloa in Group A.
Jim McInally’s Peterhead, who defeated Hearts in the group stages last year, are in Group D along with Dundee, Dunfermline, Stirling Albion and Brechin City.
St Johnstone, the top seeds in Group B, will face Falkirk, Montrose, East Fife and Forfar.
The group stages will feature the 40 participating clubs playing fixtures across five match days – July 14, 18, 21, 25 and 28.
The format of the previous seasons will continue with penalty shoot-outs used to decide a bonus point in the event of matches ending in a draw.
The eight group winners and the four best runners-up will progress to the last 16 where they will be joined by the four clubs in European competition in July – Celtic, Aberdeen, Rangers and Hibernian.
GROUP A – Ross County, Dundee United, Arbroath, Elgin City, Alloa Athletic
GROUP B – St Johnstone, Falkirk, Montrose, East Fife, Forfar Athletic
GROUP C – Hearts, Caley Thistle, Raith Rovers, Cowdenbeath, Cove Rangers
GROUP D – Dundee, Dunfermline, Stirling Albion, Brechin City, Peterhead
GROUP E – Partick Thistle, Morton, Albion Rovers, Ayr United, Stenhousemuir
GROUP F – Hamilton, Livingston, Berwick Rangers, Airdrieonians, Annan Athletic
GROUP G – Motherwell, Queen of the South, Clyde, Edinburgh City, Stranraer
GROUP H – Kilmarnock, St Mirren, Dumbarton, Queen’s Park, Spartans