-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support messaging #18
Conversation
import "bottle/account/v1/organization.proto"; | ||
|
||
message Created { | ||
bottle.account.v1.Organizatio organization = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bottle.account.v1.Organizatio organization = 1; | |
bottle.account.v1.Organization organization = 1; |
We need to make some decisions about how we want to handle events that occur for a resource. Do we make these "Created" ("Updated", etc) messages or do we take a different approach? I'm not married to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the last word being the verb that occurred. We just need to be consistent about it. Case in point bottle.support.v1.Question
should be bottle.support.question.v1.Created
. This also brings up the different between stuff being in the notification
namespace or just their own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bottle.support.v1.Question
still needs to exist, just like bottle.account.v1.User
does. Those are the resources.
Under notifications is where the line is a little blurry. These are notifications in our system but they're also events that take place, which reference the User resource.
Do we want to start doing something like:
bottle.events.v1.Created
and it have any resource in it or perhaps bottle.events.support.v1.QuestionCreated
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another good example for us to think about is Organization Membership.
Do we want to have a "OrganizationJoined" message with both an org and user? What about when they're removed from an organization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably avoid trying to have a single events namespace and shoehorn every kind of event in that. It will inevitably grow. I like bottle.events.support.v1.QuestionCreated
(or bottle.support.events.v1.QuestionCreated
) having a bottle.support.v1.Question
resource attached to it.
For the org example I picture something like:
bottle.account.v1.Organization
bottle.account.v1.User
message bottle.account.events.v1.OrganizationJoined {
bottle.account.v1.Organization organization = 1;
bottle.account.v1.User user = 2;
)
message bottle.account.events.v1.OrganizationLeft {
bottle.account.v1.Organization organization = 1;
bottle.account.v1.User user = 2;
)
If we go this way we can also extend the events a bit more down the line so we can do things like:
message bottle.account.events.v1.OrganizationJoined {
bottle.account.v1.Organization organization = 1;
bottle.account.v1.User user = 2;
bottle.account.v1.User author = 3; # Probably could use a better name
string message = 4; # Something to display on the invite email or something
int permissions = 5; # If we add permissions or something
)
64ab58d
to
37454e2
Compare
protos/bottle/account/v1/user.proto
Outdated
|
||
AccountType account_type = 7; | ||
string company_name = 8; | ||
bottle.account.v1.Organization organization = 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the other organization changes, this may not be necessary at the moment 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should be needed. Plus we should take into consideration a person being a part of multiple organizations. So here is what I'm thinking:
- Help Desk listens to all of the organization events to mirror them in zendesk
- The question message has a user and an organization
That gives us these advantages:
- The user can belong to multiple organizations
- The user can pick what organization (or no org) when creating the question (or the system can depending on order etc)
Things to consider:
- We need to make sure zendesk and our system are in sync then
- We need to have that supported in Zendesk https://support.zendesk.com/hc/en-us/articles/204281436-Enabling-multiple-organizations-for-users-Professional-and-Enterprise-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this from now. Since we don't yet support multiple orgs in Zendesk, we won't need to spend too much time supporting that in our system. Removing this now gives us flexibility later 👍
protos/bottle/account/v1/user.proto
Outdated
|
||
AccountType account_type = 7; | ||
string company_name = 8; | ||
bottle.account.v1.Organization organization = 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should be needed. Plus we should take into consideration a person being a part of multiple organizations. So here is what I'm thinking:
- Help Desk listens to all of the organization events to mirror them in zendesk
- The question message has a user and an organization
That gives us these advantages:
- The user can belong to multiple organizations
- The user can pick what organization (or no org) when creating the question (or the system can depending on order etc)
Things to consider:
- We need to make sure zendesk and our system are in sync then
- We need to have that supported in Zendesk https://support.zendesk.com/hc/en-us/articles/204281436-Enabling-multiple-organizations-for-users-Professional-and-Enterprise-
Officially a breaking change with the removal of Notification namespace. This means this needs to go out in the late evening in addition to coordinating the release across impacted apps (Bullhorn and HAL). |
Need to add an events replacement for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good aside those two comments.
Talking for migration, I think it would have been best to keep the old notifications, create the new events, update all the receiving code to handle new events, update the sender code to send new events, then remove the notification protos.
Update I didn't read your comments when reviewing
63b92e9
to
7f0876e
Compare
7f0876e
to
5cab424
Compare
5cab424
to
d00ca98
Compare
string id = 1; | ||
string subject = 2; | ||
string message = 3; | ||
repeated string tag = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a plural to follow our other repeated fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with merging this if you're done
This is the minimum number of messages necessary migrate the Zendesk integration out of HAL.