The present invention relates to 1-[m-carboxamido(hetero)aryl-methyl]-heterocycyl- carboxamide compounds of formula (I) wherein X, Ar1, R1, R2, R3, R4, R5a, R5b and p are as described in the description, to their preparation, to pharmaceutically acceptable salts thereof, and to their use as pharmaceuticals, to pharmaceutical compositions containing one or more compounds of formula (I), and especially to their use as CXCR7 receptor modulators.