You have to use 2 camlocate to do that.
The first camlocate try to find part x. If it fail, the second camlocate will try to find part y.
It will work only if part x and part y are different enough so that the camera does not detect a x part as a y part.
Using the Wrist camera on a UR5e, Is it possible to have the camera detect different part types. then assign it as a product number?
e.g. I have a tray of parts (Type x) Camera locates all parts as Type x process as required. The next tray has (Type y) parts. Camera locates all parts as Type y process as required.