How can I automatically generate unique discount codes for customers?

Hi All!

We are looking to revamp a program where customers can try our product before they buy and upon placing that order the also receive a unique discount code to use on their first purchase.

I want this discount to be unigue only to that one customer, limited to one transaction.

Is there a way to have these automatically generated or an app to perform this task?

Thanks!