Not sure which plugin you are using but there are the layer_rgba , layer shader and the mix shader for this kind of thing.
What is the shading effect that you want? A label on a glass for example? Any images would be useful.
Say you want to have a mesh with a label/decal that needs to be changed independently of the rest of the material. For example a purple box with a red circle on it.
So I create a black texture and I make a white circle in it for the transparency. I assume that you can use the layer_rgba with these two objects to get the result but I can't get it to work.
Desired end result:
Never mind, I figured it out. The black & white image for the stencil needs to have 'Alpha is Luminance" checked and plugged into the 'Mix' on the top layer. Not sure if that is the easiest way but it works.