How to store that data in your code effectively depends on which interface to choose an item script needs to provide. If user input is name of item, then table item names as keys and item identifiers as values can work well. If user chooses option from list of possible items, then it can be table of tables with each inner table having name and value fields. Below is an example of tables for both of mentioned options:
-- Option 1
local items = {
["dirt"] = 123,
["stone"] = 456
}
-- Option 2
local items = {
{name = "dirt", value = 123},
{name = "stone", value = 456}
}