if you're using Giles plugin, it'll do all item handling for you.
It'll score each item that the bot picked up and when the bag is full, will initiate Town Run routine and i'll Sell , Stash , Stash based on the item score.
You can change the item threshold in Plugins > Giles > Town Runs.
The default settings are mainly for Inferno runs.