- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Phone Number to SIS User File
Question: is there a way to add a phone number to the SIS User File Import so that a student's phone number can be pulled from the SIS and added to the Ways to Contact under their User file. I'm sure there's a possiblity of a way, but I'm uncertain what the field name needs to be.
Any thoughts? ideas? successes?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@akinsey ,
Phone number is not an allowed field in the users.csv SIS import. Neither are what contact methods can be used.
The only place that phone is mentioned in the API is as an example for the Store custom data endpoint. You could write some custom code that would pull that out and display it, but it is definitely not a core component of Canvas. You might even add a button through the custom global JavaScript that would look up the phone number. You might even be able to get it to send a text to that message as an admin, but if it's not registered as a communication channel, that would most likely involve something outside Canvas.
SMS is available as a notification, and that's the channel that is listed under the Profile page when you list ways to contact. Automatically adding texting without their consent as a communication channel could be problematic (possibly legally but definitely not a nice thing to do to the users) but it can be done through the Communication Channels API.
If automatically setting up students to receive notifications weren't bad enough, sharing their cell phone numbers with everyone and telling people it's okay to contact them that way certainly opens doors you probably don't want opened. This is connected to the "Let fellow course/group members see which services I've linked to my profile" option from the Profile page, but that option is enabled by default.
Even if you have looked at all the downsides of doing this and decide you want to proceed, you're running into some technical issues at this point. The call to update the profile and set the ways to contact is not an API call. It's a PUT to <instance>/profile/update_profile that is made as the user. There's actually a bug in it right now, a malformed request (see the first google_drive with the missing closing bracket), but it still worked.
Sometimes the calls made by the Web UI are duplicated with the API, but not always. I like to go check the mobile apps when I'm questioning the existence of an API call. After I've looked high and low and can't find it, I go to the Canvas app. If the ability to accomplish what I want is there, then I am pretty sure there's an API call for it. If the ability to do what I want is noticeably missing (other things are there, but not that one thing), then Bayesian probabilities kick in and the chance of the API call existing just took a nosedive.
You can use a headless browser to make non-API calls. I'm not sure how that would work here since you need to be the user (I don't know if as_user_id works with non-API calls), you might have to masquerade as each user, agree to the (soon to be) "Act as user" page, then make the call. In the past, I've used CasperJS that called PhantomJS to act as a headless browser, but with Chrome 59 that came out in June 2017, you can now run a headless chrome. I have not looked into that enough to know whether it is a viable alternative or not.
Finally, when you wrote
I'm sure there's a possiblity of a way
was that because you have heard or seen someone do this, because you're being optimistic, offering the common "I'm sure it's simple but I can't find it", or something else? As you can probably tell from my post, I'm not convinced there is a way -- at least one that's easily accomplished -- and kind of glad that there's not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@akinsey , I'm not sure if this is possible, but I'm going to share this with the https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=84abffd5-6c0a-4b67-8c26-... group to see if they can help! In addition, you might consider joining this group to get access to their information and resources.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@akinsey ,
Phone number is not an allowed field in the users.csv SIS import. Neither are what contact methods can be used.
The only place that phone is mentioned in the API is as an example for the Store custom data endpoint. You could write some custom code that would pull that out and display it, but it is definitely not a core component of Canvas. You might even add a button through the custom global JavaScript that would look up the phone number. You might even be able to get it to send a text to that message as an admin, but if it's not registered as a communication channel, that would most likely involve something outside Canvas.
SMS is available as a notification, and that's the channel that is listed under the Profile page when you list ways to contact. Automatically adding texting without their consent as a communication channel could be problematic (possibly legally but definitely not a nice thing to do to the users) but it can be done through the Communication Channels API.
If automatically setting up students to receive notifications weren't bad enough, sharing their cell phone numbers with everyone and telling people it's okay to contact them that way certainly opens doors you probably don't want opened. This is connected to the "Let fellow course/group members see which services I've linked to my profile" option from the Profile page, but that option is enabled by default.
Even if you have looked at all the downsides of doing this and decide you want to proceed, you're running into some technical issues at this point. The call to update the profile and set the ways to contact is not an API call. It's a PUT to <instance>/profile/update_profile that is made as the user. There's actually a bug in it right now, a malformed request (see the first google_drive with the missing closing bracket), but it still worked.
Sometimes the calls made by the Web UI are duplicated with the API, but not always. I like to go check the mobile apps when I'm questioning the existence of an API call. After I've looked high and low and can't find it, I go to the Canvas app. If the ability to accomplish what I want is there, then I am pretty sure there's an API call for it. If the ability to do what I want is noticeably missing (other things are there, but not that one thing), then Bayesian probabilities kick in and the chance of the API call existing just took a nosedive.
You can use a headless browser to make non-API calls. I'm not sure how that would work here since you need to be the user (I don't know if as_user_id works with non-API calls), you might have to masquerade as each user, agree to the (soon to be) "Act as user" page, then make the call. In the past, I've used CasperJS that called PhantomJS to act as a headless browser, but with Chrome 59 that came out in June 2017, you can now run a headless chrome. I have not looked into that enough to know whether it is a viable alternative or not.
Finally, when you wrote
I'm sure there's a possiblity of a way
was that because you have heard or seen someone do this, because you're being optimistic, offering the common "I'm sure it's simple but I can't find it", or something else? As you can probably tell from my post, I'm not convinced there is a way -- at least one that's easily accomplished -- and kind of glad that there's not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, @James and @kona ! You guys really are the best.
Some of the issues/questions you raised, James, I had not even considered. It was definitely an off-the-cuff question as a means to contact students, particularly when the standard school email is not being checked. So we're just trying to think through ways to contact students in ways they are using when the main method is not being utilized. Thanks for your help and expertise!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is frustrating how student's don't check their school emails. I think the last I checked it was somewhere around 30-40% of currently enrolled students who don't check their student email or have it forwarded somewhere else. I also did an analysis of unread emails last semester and I think it was nearly half of the unread messages were notifications from Canvas.
Note that I haven't looked at the numbers since March and I'm going from memory so they may be off a little, but not dramatically.
