How to decode the on a function in plain solidity?

I was wondering how to decode the data payload received on a function

At first, I thought it would be enough with knowing the order of the variables and the exact data type of them at the moment of encoding, but when I tried to decode the as follows (var1,var2,var3) = abi.decode(,(dataType1,dataType2,dataType3));, the operation was failing and the entire tx was reverted.