first, on the cart page, you need to add a set session value server behavior.
In the server behavior panel, click the plus button and select eCart -> General -> Set Session Value.
Select the Any Form Post trigger
Set the name to "couponCode"
click the lightning bolt next to value and select the CID form element.
Next create the discounts.
I know I've been working with you on another post for applying a selection for Local shipping and UPS shipping, so you will need to create the same exact rules on the discount tab.
Use the same triggers and same calculations. The only difference is that you need to also add an Additional Trigger:
AND
Based on session variable value:
If the session variable "couponCode" has a value "=" to "free shipping code"
substitute "free shipping code" with the actual coupon code you wish to use for free shipping.