samagra-comms / inbound

0 stars 15 forks source link

NL App integration #31

Open surabhi-mahawar opened 1 year ago

surabhi-mahawar commented 1 year ago

NL App integration - UCI These few things need to done on UCI end for NL app integration.

  1. Addition of new ODK forms
  2. Maps ODK forms to users / Segmentation.
    • Trigger new conversation as soon as form is uploaded.
  3. Attach ODK adapter to UCI web channel.
  4. Accept FCM token from users
  5. Push notifications to users
  6. Create UserId <> BotId - ChatList
  7. Updating an existing ODK form.
  8. Favoriting a chat.
surabhi-mahawar commented 1 year ago

Added comment with each point after discussion with Chakshu:

  1. Addition of new ODK forms- can be done with the current flow
  2. Maps ODK forms to users / Segmentation. - We cannot do this as we are not keeping any user information on our end. We can provide an API from which you can tirgger broadcast to users, given that all the users have a FCM token registered with them. What happens with the Push notification have to figured out on NL App end. - Trigger new conversation as soon as form is uploaded. - This is also not possible, as we can only push a notification, after this we do not have the control over the App, so cannot start a conversation on behalf of the App. This will also have to be on NL App end.
  3. Attach ODK adapter to UCI web channel. - As we are not saving any user information, we cannot associate any user to any bot before a conversation actually starts. We are only keeping the chat history of a user & bot respective to there ids.
  4. Accept FCM token from users - We have an API for this.
  5. Push notifications to users - There will be an API to trigger this.
  6. Create UserId <> BotId - ChatList - Need time to implement this (TBD)
  7. Updating an existing ODK form. - Need an update conversation logic API
  8. Favoriting a chat. - Not possible via UCI

CC: @ChakshuGautam

karntrehan commented 1 year ago

Summary of conversation / Next steps:

Maps ODK forms to users / Segmentation. - NL will have to build a segmentation system which sends FCM of segment users.

Trigger new conversation as soon as form is uploaded. - This is doable but need a conversation on implementation with @ChakshuGautam .

Getting bot list for a user - Need to check if cassandra will be able to do this or update db structure to support this.

karntrehan commented 1 year ago

Summary of conversation / Next steps:

Maps ODK forms to users / Segmentation. - NL can add this information to user service and share the user query with UCI. Response of this query needs to follow a spec: @surabhi-mahawar to share.

Trigger new conversation as soon as form is uploaded. - This will need to be done from the frontend. Would need to hide the first message.

Getting bot list for a user - UCI team to work on this.

@karntrehan to build a flow diagram of Android <> Web Channel <> Admin console <> UCI flow. Flow to contain needed APIs and descriptions. Team to review the same.

karntrehan commented 1 year ago

Open question: How is connection ID generated? Is it based on User Auth Id or FCM token?

surabhi-mahawar commented 1 year ago

Summary of conversation / Next steps:

Maps ODK forms to users / Segmentation. - NL can add this information to user service and share the user query with UCI. Response of this query needs to follow a spec: @surabhi-mahawar to share.

Trigger new conversation as soon as form is uploaded. - This will need to be done from the frontend. Would need to hide the first message.

Getting bot list for a user - UCI team to work on this.

@karntrehan to build a flow diagram of Android <> Web Channel <> Admin console <> UCI flow. Flow to contain needed APIs and descriptions. Team to review the same.

@karntrehan This is the specific format that we expect the user data should have. http://143.110.255.220:8080/fusionAuth/fetchFcmTokens