In cricket, the batting order is the sequence in which batsmen play through their team's innings, there always being two batsmen taking part at any one time. All eleven players in a team are required to bat if the innings is completed (i.e., if the innings does not close early due to a declaration or other factor).
The batting order is colloquially subdivided into:
The order in which the eleven players will bat is usually established before the start of a cricket match, but may be altered during play. The decision is based on factors such as each player's specialities; the position each batsman is most comfortable with; each player's skills and attributes as a batsman; possible combinations with other batsmen; and the match situation whereby, for example, the team may require a more defensive or attacking player at that point in the innings. Also, a middle order batsman in Tests may open for ODI's and Twenty20 due to their aggressive approach to the game.
The captain of the team can change the batting order during the game at his or her discretion. They can even change the batting line-up from one game to another in a tournament or series. There are no rules about the nature or number of changes made and, if more than one innings is played, the order used in each need not be the same. It has even been known for a captain to completely reverse his batting order for the second innings after following on. This has made it possible for a bowler to take a hat-trick across three consecutive overs of a match, including the same batsman twice.
There are various reasons why the captain might make a change from the established order. Usually, however, captains and coaches prefer not to adjust the batting order unless necessary, as for example when South Africa had to move Imran Tahir up the order against India because South African top 7 batsmen are poor against spin bowlers, a plan which backfired spectacularly. In 2017, Faf du Plessis, who returns to the side as Test Captain after paternity leave, decided to make many changes to the batting lineup before the second test against England after being handed a heavy defeat. Du Plessis replaced JP Duminy at no.5, and moved Quinton de Kock from 5 to 4 (de Kock already moved from no. 7 to 5 between the 1st and 2nd innings of the first Test), and due to the suspension of Kagiso Rabada due to demerit points, so Duanne Olivier replaced him, Philander moved up a spot to no.7, while Theunis de Bruyn was replaced by Chris Morris at no. 8.