Typically when a company writes off bad debt, it has no value (at that point) to the company, but.....
If those uncollectible accounts are sent to a collection agency, AND the agency is paid, the agency will take their fee (typically 30-50%), and the difference goes back to the company.
If/when the company receives this net amount from the collection agency, the transaction is either an offset to collection expense, or bad debt expense. NOT revenue.