for pattern base sms api you should write code for each pattern even if there is 100's of patterns but with this design you can set your patten name and attributes to your databse and just call them in your code to pass data of pattern and you are done; you can send your sms through a pattern base sms api