JavaScript API: creating attributes

I know I can send “name” and “email” as attributes using the .setAttributes() method of the JavaScript API.
However, I tried sending “phone,” but when viewing the chat as an agent, the “Phone” attribute is not populated with the value I sent using the JavaScript API.
How can I send additional attributes, such as phone number, user ID (an ID from my application), device configurations, and others?