If you look at the canonical lineage of French Monarchs, you will notice that there is a King Dagobert I who ruled from 628 to 637, and a King Dagobert III who ruled from 711 to 716, but Dagobert II is apparently missing in action.

There was indeed a Dagobert II, however. He was the son of Sigebert III, who was king of the Merovingian vassal state of Austrasia and brother to King Clovis II. Born in 650, Dagobert II was the legitimate heir to the Austrasian throne, but when his father died in 656 young Dagobert was packed off to an Irish monastery so that Sigebert's seneschal Grimoald could place his own son Childebert the Adopted on the throne.

After the downfall of Grimoald and Childebert in 662, Dagobert's cousin Chlotar III, king of Neustria, secured the Austrasian throne for King Childeric II. Childeric ruled Austrasia and much of the rest of France until he was assassinated in 674. Dagobert, meanwhile, had married a Celtic princess, Mathilde of York, and moved to England (666). With the help of St. Wilfrid, bishop of York, Dagobert was located and restored to the Austrasian throne in 676. He ruled for three short years before being murdered by followers of Theodoric III, who was seeking to unify France under his own rule.

Because Dagobert was a direct descendant of Merovich, on the same level as kings Lothair III, Childeric II, and Theodoric III, and ruled one of the Frankish kingdoms in an era when France was spintered into many kingdoms anyway, he was counted as a member of the Merovingian dynasty when Dagobert III took the throne.