National rules of origin are used to determine origin when preferential tariff treatment is not required or the goods do not meet the preferential rules in the various free trade agreements.
Here the national (not-preferential) rules in the import country apply.
Nowadays, national rules of origin vary by country. Individual countries have general rules, whereas others have more detailed regulations.
What normally applies is the principle that the country of origin of the raw materials is the country where the raw materials originate from / are produced in. Such origin will be laid down in connection with issuing own national certificates of origin.
Insofar as processed goods are concerned (where the raw materials come from other countries), the country of origin is the country where the goods have undergone their last material processing and have received their current form.
Unless the respective importing country has a document of its own, we can refer to the Certificate of Origin as the most frequently used certificate here. Check with the importer about the specific requirements for visaing/legalisation.