Dynamic Coupon Code

Can anyone help me to a way in which coupon codes can be made dynamic in IS. Making static ones is easy peasy but I cannot find anywhere (also in Marketplace Apps) how to implement dynamic codes. Many thanks in advance for your input, Han.