Thanks. The work we did was for the contractor who did the energy efficiency upgrade work for our customer after we did an energy audit. The money was for our referring the business to the contractor for an agreed upon referral fee, and we performs tasks on behalf of the contractor that were necessary to insure the homeowner (our customer and now the contractors customer) received their rebates under Energy Upgrade California. Plus we did Title 24 Compliance testing. The work was completed in April. So I'm way past the 20 days. But it appears I should still send the prelim notice.
Late preliminary notices are better than nothing, but you still may be too late. Some of the things you mentioned (i.e. the referral fee) may not be lienable.