Hi All,
I searched quite a while trying to find an answer to this and came up with quite a few answers to different problems that together eventually solved my problem.
So here's the problem. We want to use a Configuration Profile to fully manage the dock for multiple users. This means app icons (both Apple and third party) as well as manage the files and folders found on the right side of the dock. Folders such as "Documents" and "Downloads". However, they need to be relative to each user who logs in.
Now, there are two possible ways to accomplish this (well, three if you want to package deploy but we're talking about Config Profiles so we'll stick with two).
1.) Dock payload in a Configuration Profile: You can go the route of using the Dock payload and it gives you the option to type in the full path of the folder/file that would live on the right side of the dock and it also allows you to choose from a pull down to show APPLE INSTALLED APPLICATIONS ONLY on the right side of the dock... yes, you read that right, currently you cannot add 3rd party apps to the dock with the Dock payload. Bye bye Chrome and Firefox, you will be missed. Ok, so this solution does not work for us.
2.) Use the Custom payload in a Configuration Profile to upload a plist. Basically, set up a dock on a machine the way you want it, copy the com.apple.dock.plist file from the said user library folder, and then upload in the Custom payload section within a Config Profile. This works great until we get into the Documents and Downloads folders. Since they are user specific in the plist, weird question marks and symbols show up in the dock when a different user logs in. However, if there was only a way to make the paths relative in the plist... YOU CAN! See below...
This is a sample of how a typical entry for the Downloads folder would look like in your dock plist:
<dict>
<key>GUID</key>
<integer>3794117482</integer>
<key>tile-data</key>
<dict>
<key>arrangement</key>
<integer>1</integer>
<key>book</key>
<data>
Ym9vaxQDAAAAAAQQMAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAKAIAAAcAAAABAQAATGlicmFy
eQAGAAAAAQEAAFN0YWNrcwAAFwAAAAEBAABEZXBhcnRt
ZW50IEFwcGxpY2F0aW9ucwAMAAAAAQYAAAQAAAAUAAAA
JAAAAAgAAAAEAwAARTQBAAAAAAAIAAAABAMAAJOvAQAA
AAAACAAAAAQDAACVrwEAAAAAAAwAAAABBgAAWAAAAGgA
AAB4AAAACAAAAAAEAABBvFLUpgAAABgAAAABAgAAAgAA
AAAAAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAEFAAAIAAAA
AQkAAGZpbGU6Ly8vAwAAAAEBAABPSVQACAAAAAQDAAAA
wFrM6AAAAAgAAAAABAAAQbzTzbsAAAAkAAAAAQEAADk5
MzY0MDBCLTZCOUUtM0M4Mi05NUM0LTJBNzE1NTNCMzg4
MRgAAAABAgAAgQAAAAEAAADvEwAAAQAAAAAAAAAAAAAA
AQAAAAEBAAAvAAAAuAAAAAECAABhMDIyN2Q1NWY3NGIx
M2I1YWY0Y2EyNjA5YzI0MmU3N2UzMGM5ODU0OzAwMDAw
MDAwOzAwMDAwMDAwOzAwMDAwMDAwMDAwMDAwMjA7Y29t
LmFwcGxlLmFwcC1zYW5kYm94LnJlYWQtd3JpdGU7MDAw
MDAwMDE7MDEwMDAwMDI7MDAwMDAwMDAwMDAxYWY5NTsv
bGlicmFyeS9zdGFja3MvZGVwYXJ0bWVudCBhcHBsaWNh
dGlvbnMAtAAAAP7///8BAAAAAAAAAA4AAAAEEAAARAAA
AAAAAAAFEAAAiAAAAAAAAAAQEAAArAAAAAAAAABAEAAA
nAAAAAAAAAACIAAAXAEAAAAAAAAFIAAA1AAAAAAAAAAQ
IAAA5AAAAAAAAAARIAAAEAEAAAAAAAASIAAA8AAAAAAA
AAATIAAAAAEAAAAAAAAgIAAAPAEAAAAAAAAwIAAAzAAA
AAAAAAAB0AAAzAAAAAAAAACA8AAAaAEAAAAAAAA=
</data>
<key>displayas</key>
<integer>1</integer>
<key>file-data</key>
<dict>
<key>_CFURLString</key>
<string>file://Users/admin/Downloads</string>
<key>_CFURLStringType</key>
<integer>15</integer>
</dict>
<key>file-label</key>
<string>Downloads</string>
<key>file-mod-date</key>
<integer>3536342438</integer>
<key>file-type</key>
<integer>2</integer>
<key>parent-mod-date</key>
<integer>3536342617</integer>
<key>preferreditemsize</key>
<integer>-1</integer>
<key>showas</key>
<integer>2</integer>
</dict>
<key>tile-type</key>
<string>directory-tile</string>
</dict>
Yuck.
Notice in the file path above how it's specific to the user "admin". This is not good and will cause problems. Here is how you fix it. Basically change the above to look like this:
<dict>
<key>GUID</key>
<integer>3794117482</integer>
<key>tile-data</key>
<dict>
<key>arrangement</key>
<integer>1</integer>
<key>displayas</key>
<integer>1</integer>
<key>home directory relative</key>
<string>~/Downloads</string>
<key>showas</key>
<integer>0</integer>
</dict>
<key>tile-type</key>
<string>directory-tile</string>
</dict>
Wow, that looks much better. You can simply change the folder name in the above to "Documents", "Pictures", whatever. Notice too that the key "home directory relative" is the main workhorse here. This tells the Dock to pull the relative location of ~/Downloads. The other keys such as arrangement, displayas, etc.. are settings you get when you right click on your folder in the dock to make it display as a grid, stack, etc... If you're copying the plist file, you won't need to change these settings and can leave them be.
Yes, this is a bit tedious but at least it's a workaround that allows you to successfully deploy a Configuration Profile that allows you to add Apple Apps AND 3rd party apps as well as have working, aesthetically pleasing folders (no weird question marks or icons) on the right side of the dock.
Hope this is helpful and useful until Jamf finally adds this feature: Add third-part apps to Dock configuration profile