As a follow up to my thread about using the user API, I'm curious about
some of the information it returns. Listed in the documentation [1] there
is a "default_phone_number" field that is the "Primary phone number of user".
How does one set that? On the CCHQ user details page [2] one can add or
remove phone numbers, but if there are multiple phone numbers there seems
to be no way to set the default, or primary, phone number for a user.
Here's the context. We have a separate IVR system that uses phone numbers
as unique IDs for CHWs. However, CHWs change their sim cards from time to
time, which means that our system needs updating. Our field partners are
good about updating the phone number on CCHQ and don't want to update a
separate system (understandably). The problem is that the new number just
gets added to the phone_numbers list and there doesn't seem to be any way
to mark one as the primary number. Possible solutions:
Get the field staff to delete all old phone numbers when adding a new
one. That's probably not desirable for a number of reasons, including just
keeping things around for posterity
Update the IVR system to have a many-to-one mapping of phone numbers to
user data. This shouldn't be too hard, but is less desirable because it
potentially opens up another door to personal data if a sim card was lost
or being used by a different individual.
Update CCHQ to allow specifying the "current" phone number and returning
that as the "default_phone_number"
The "default" phone number is currently simply the first one in the list.
One hacky alternative would be to delete the other numbers and re-add them,
which would preserve the data but end up with the right default.
We don't currently have any way to set the default number from the UI.
We'll add it to the feature requests for the time being and keep you
updated on progress.
thanks,
Cory
···
On Fri, May 3, 2013 at 1:23 PM, Brian DeRenzi wrote:
As a follow up to my thread about using the user API, I'm curious about
some of the information it returns. Listed in the documentation [1] there
is a "default_phone_number" field that is the "Primary phone number of user".
How does one set that? On the CCHQ user details page [2] one can add or
remove phone numbers, but if there are multiple phone numbers there seems
to be no way to set the default, or primary, phone number for a user.
Here's the context. We have a separate IVR system that uses phone numbers
as unique IDs for CHWs. However, CHWs change their sim cards from time to
time, which means that our system needs updating. Our field partners are
good about updating the phone number on CCHQ and don't want to update a
separate system (understandably). The problem is that the new number just
gets added to the phone_numbers list and there doesn't seem to be any way
to mark one as the primary number. Possible solutions:
Get the field staff to delete all old phone numbers when adding a new
one. That's probably not desirable for a number of reasons, including just
keeping things around for posterity
Update the IVR system to have a many-to-one mapping of phone numbers to
user data. This shouldn't be too hard, but is less desirable because it
potentially opens up another door to personal data if a sim card was lost
or being used by a different individual.
Update CCHQ to allow specifying the "current" phone number and returning
that as the "default_phone_number"
Thanks Cory. I figured it chose the top one. I think the delete-and-re-add
would be a bit much to ask from our partners. I think for the immediate
future, the best option is probably to make my app support the many-to-one
mapping and just import/respond to all phone numbers.
Brian
···
On Fri, May 3, 2013 at 10:51 AM, Cory Zue wrote:
Hey Brian,
The "default" phone number is currently simply the first one in the list.
One hacky alternative would be to delete the other numbers and re-add them,
which would preserve the data but end up with the right default.
We don't currently have any way to set the default number from the UI.
We'll add it to the feature requests for the time being and keep you
updated on progress.
As a follow up to my thread about using the user API, I'm curious about
some of the information it returns. Listed in the documentation [1] there
is a "default_phone_number" field that is the "Primary phone number of user".
How does one set that? On the CCHQ user details page [2] one can add or
remove phone numbers, but if there are multiple phone numbers there seems
to be no way to set the default, or primary, phone number for a user.
Here's the context. We have a separate IVR system that uses phone numbers
as unique IDs for CHWs. However, CHWs change their sim cards from time to
time, which means that our system needs updating. Our field partners are
good about updating the phone number on CCHQ and don't want to update a
separate system (understandably). The problem is that the new number just
gets added to the phone_numbers list and there doesn't seem to be any way
to mark one as the primary number. Possible solutions:
Get the field staff to delete all old phone numbers when adding a new
one. That's probably not desirable for a number of reasons, including just
keeping things around for posterity
Update the IVR system to have a many-to-one mapping of phone numbers to
user data. This shouldn't be too hard, but is less desirable because it
potentially opens up another door to personal data if a sim card was lost
or being used by a different individual.
Update CCHQ to allow specifying the "current" phone number and
returning that as the "default_phone_number"