The IUPAC rules are
a)Find out the longest chain of carbon in the given organic compound
b)We will name the longest chain.
c)We will identify the main functional group and will assign a suffix to the compound.
d)We will number the carbons in the longest chain selected so that the attached groups attain lowest numeral as substituent
e)We will name the side groups or chains.