For chewier bars, substitute sweetened shredded coconut for the unsweetened coconut flakes.
Crust: Preheat oven to 375 degrees. Butter a 9-by-13-inch baking pan and line with parchment, leaving a 2-inch overhang on long sides. Whisk together flour, oats, and salt.
Beat butter with brown sugar on medium speed in a mixer fitted with the paddle attachment until light and fluffy, about 2 minutes. Reduce speed to low and add flour mixture, 1 cup at a time, until dough comes together in large clumps.
Firmly press dough into bottom of prepared pan. Pierce all over with a fork. Bake until golden brown, 18 to 20 minutes. Transfer to a wire rack; let cool slightly. Reduce oven temperature to 325 degrees.
Filling: Combine butter, sugars, cream, and salt in a medium saucepan; bring to a boil over medium-high. Cook, stirring constantly, until mixture coats the back of a spoon, about 2 minutes. Remove from heat; stir in vanilla.
Scatter chocolate chips and pecans on top of crust. Drizzle with caramel and sprinkle with coconut. Bake until coconut is golden and caramel is bubbling, about 20 minutes. Let cool completely in pan on a wire rack before cutting into bars. Bars can be stored up to 2 days in an airtight container at room temperature.