The dynamics of pairs and triplets of particles suspended in a viscoelastic fluid and flowing along the centerline of a cylindrical channel is studied by numerical simulations. The governing equations are solved by the finite element method by employing an ALE formulation to handle the particle motion. For a pair of particles, at variance with the Newtonian case, the viscoelastic nature of the suspending medium alters the interparticle distance during the flow. For low and moderate Deborah numbers, the particles can approach or separate depending on the initial distance. For high Deborah numbers, the approaching dynamics disappears. Different fluid rheology and confinement ratio only quantitatively alter such a scenario. The three-particle dynamics is more complex. In a Newtonian liquid, the leftmost particle of the triplet approaches and slows down the middle one. Consequently, the rightmost particle separates, giving rise to a pair and an isolated particle. A similar scenario occurs for a viscoelastic liquid. In this case, however, depending on the initial configuration and the Deborah number, the particles forming the pair can subsequently approach or separate. In the latter case, the final configuration is the formation of three isolated particles.