You can easily create a link on Shopify to automatically enter a discount code to your customers' cart. Note here we're talking about discount codes, not automatic discounts.
You simply structure your links (in external ads or on-site banners/collection links) etc like this:
Where TESTBC is the name of the code the customer would normally need to enter in checkout, and /collections/all-products is where you want to send them when they click the link. If you leave off the redirect part of the URL they'll wind up on the home page.
After clicking the link and items to cart, they'll find the code has already been applied for them.