// Application
Drupal 7
// Problem Background
My website imports product data from a CSV file. I have a module that parses the file and creates appropriate nodes. In the CSV file, product category is given by category ID, which are different than Taxonomy Term IDs I have for the product categories in Drupal. I have created a custom field in my Taxonomy Vocabulary ("category_id") to link Drupal categories to imported category IDs.
When creating a node during import, I need "tid" (Taxonomy Term ID) to assign a node to a Taxonomy Term.
// The Question
How can I find Taxonomy Term ID ("tid"), knowing the value of a custom Taxonomy field?