24.2.2.3. Seam.Component.getComponentName()

Passing an object into this method returns the component name, if it is a component, or null if it is not.
if (Seam.Component.getComponentName(instance) == "customer")
    alert("Customer");
else if (Seam.Component.getComponentName(instance) == "staff")
    alert("Staff member");