Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcode Conversations #2

Open
Arique1104 opened this issue Nov 16, 2023 · 17 comments
Open

Shortcode Conversations #2

Arique1104 opened this issue Nov 16, 2023 · 17 comments
Assignees

Comments

@Arique1104
Copy link
Collaborator

Resource created by Karim and Megan assignees to this ticket.

Miro Board Resource

Karim
Megan

@mabrownnyu
Copy link
Collaborator

What we're going to implement on this issue is the back end API call to check for the short code and get it + a front end check short code button

It will then put the shortcode in the phone numbers table

After that, we will need to implement some switching

@Arique1104
Copy link
Collaborator Author

Hey @mabrownnyu and @KarimAl-Rashdan, it sounds like there are two tickets here, and I just want to document that correctly.

for MVP, we need an API call from Spoke that goes to Twilio to check if they have access to shortcode.

The second phase is to allow a Spoke Administrator to make the above API call.

The separate ticket is to allow for switching between a short-code and a phone number. If that sounds good, I can create another issue and put it in our backlog.

@Arique1104
Copy link
Collaborator Author

Here's the ticket for switching. StateVoicesNational#5

@Arique1104
Copy link
Collaborator Author

Recovery Moment UI Moment

From Spoke for Administrators:

  • Owners of a organization should be able to see ALL SENDERS within their services.

  • TollFree, Shortcodes, AND 10DLC VISIBILITY OF OPTIONS IS KEY

  • Phone Numbers Inventory page needs to open up more information on what is available through their Twilio Account.

  • Should be able to purchase 10DLC

@Arique1104
Copy link
Collaborator Author

  • Getting a 200 response from Twilio through Postman
  • ServiceSid that was sent for the shortcode is not the serviceSid that Twilio is returning.
  • Jim might have some better keys.

@mabrownnyu
Copy link
Collaborator

got a function going in the twilio index file called getShortCode -- need to test it to make sure it's actually processing the number correctly

also need to take a look at what the payload looks like if the account has no shortcode

@mabrownnyu
Copy link
Collaborator

mabrownnyu commented Nov 17, 2023

also github won't let me open another branch? @Arique1104

@Arique1104
Copy link
Collaborator Author

  • Added function to Twilio Extension to get the phone number.
  • Now we need to figure out if it actually works.

Tomorrow:

  • Make sure function successfully pushes shortcode to phone table

@Arique1104
Copy link
Collaborator Author

What's new

  • Miro Board is updated!
  • Inbetween for process handling (job runners or workers directory)
  • Nebulous where those items are getting passed.

Priorities for tomorrow:

  • One more piece that's missing in terms of where the admin dashboard phone number page connects to the backend through the process runners.
  • What scripts are handling the JOBS process and whether it's in extensions/ or workers/?

@mabrownnyu
Copy link
Collaborator

I think I've figured out the route of things:

containers/AdminPhoneNumberInventory.js
mutations/buyPhoneNumbers.js
extensions/job-runners/legacy.js (this is loaded from extensions/job-runners/index.js)
workers/job-processes.js
workers/jobs.js
extensions/service-vendors/fakeservice/index.js (which e should switch to Twilio to get this to actually work, but it looks like this is an environment variable thing)

@Arique1104
Copy link
Collaborator Author

Today:

  • More tracing on the spot where the information is flowing.
  • Hopefully we can get the short-code api call actually happening now.
  • Excited about the tracing!

@KarimAl-Rashdan
Copy link
Collaborator

We needed to add the getShortCodes function to the api/schema.js file

@mabrownnyu
Copy link
Collaborator

breadcrumbs

currently things are mostly connected but there is an error happening in processServiceManagers in mutations/getShortCodes.js that is not returning the correct Twilio object

@KarimAl-Rashdan
Copy link
Collaborator

Recap of what we learned:

  • API is calling the getShortCodes file
  • The issue we were facing was we're passing in null in the Twillio index file into the getShortCodes function which is supposed to take in organizations config info
  • The buyNumbers function is internal to index file
  • We're creating the twilioInstance object getShortCodes function in the index.js file
  • We added getShortCodes mutation into AdminPhoneNumberInventory.js to make the graphql query

@KarimAl-Rashdan
Copy link
Collaborator

KarimAl-Rashdan commented Nov 28, 2023

Update:
I have updated the layout and styling of the Buy phone numbers button and Check short codes button. The shortcodes branch has been updated to reflect these changes.

Pain points: I need to update the getShortCode function in src/extensions/service-vendors/twilio/index.js at line 779 to have a conditional where if shortcodes are nonexistent I can render a message to let the user know on the frontend. I am receiving a lot of errors in my browser console when I click the check short codes button; my guess is I probably don't have the right permissions. @mabrownnyu Can we sit down and figure out this getShortCode function?

@Arique1104
Copy link
Collaborator Author

  • Shortcode update is almost complete.
  • Where to put conditional if shortcode doesn't exist?
  • Deal with API keys - the key was not revoked and key was never change.

@Arique1104
Copy link
Collaborator Author

After much deliberation this engineering team has decided that the Toll-Free and the Short-code are similar but seperate issue tickets. Updating this one to reflect short-code, which is complete - pending QA. There will be a linked issue for the creation of Toll-Free.

@Arique1104 Arique1104 changed the title Shortcode & TollFree Conversations Shortcode Conversations Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for QA
Development

No branches or pull requests

3 participants