Setting default phone number

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"

Any thoughts on the best approach?

Thanks,
Brian

[1] https://confluence.dimagi.com/display/commcarepublic/List+Users
[2]
https://www.commcarehq.org/a/[domain]/settings/users/commcare/account/[userid]

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.

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"

Any thoughts on the best approach?

Thanks,
Brian

[1] https://confluence.dimagi.com/display/commcarepublic/List+Users
[2]
https://www.commcarehq.org/a/[domain]/settings/users/commcare/account/[userid]

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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.

thanks,
Cory

On Fri, May 3, 2013 at 1:23 PM, Brian DeRenzi bderenzi@gmail.com 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"

Any thoughts on the best approach?

Thanks,
Brian

[1] https://confluence.dimagi.com/display/commcarepublic/List+Users
[2]
https://www.commcarehq.org/a/[domain]/settings/users/commcare/account/[userid]

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.