Shortcodes and longcodes each have specific benefits when it comes to their uses. Typically, longcodes are used in person-to-person communication, like when you text a friend to make plans. These longcodes are 10-digit numbers that can block mass send to protect users from SMS spam.
Shortcodes, on the other hand, are better suited for business-to-consumer communications, which means they are better for SMS marketing. Shortcodes are five to six digits long and require the contacts to personally opt-in by sending a keyword to the shortcode.
In short, using shortcodes is better, more reliable, and ideal for SMS marketing.