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

Add support messaging #18

Merged
merged 2 commits into from
Dec 9, 2020
Merged

Add support messaging #18

merged 2 commits into from
Dec 9, 2020

Conversation

doomspork
Copy link
Contributor

@doomspork doomspork commented Nov 25, 2020

This is the minimum number of messages necessary migrate the Zendesk integration out of HAL.

@doomspork doomspork requested a review from a team as a code owner November 25, 2020 16:35
import "bottle/account/v1/organization.proto";

message Created {
bottle.account.v1.Organizatio organization = 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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
)

@doomspork doomspork force-pushed the scallan-zendesk-service branch from 64ab58d to 37454e2 Compare November 25, 2020 16:42

AccountType account_type = 7;
string company_name = 8;
bottle.account.v1.Organization organization = 9;
Copy link
Contributor Author

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 👍

Copy link
Contributor

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:

Copy link
Contributor Author

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 👍


AccountType account_type = 7;
string company_name = 8;
bottle.account.v1.Organization organization = 9;
Copy link
Contributor

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:

protos/bottle/notification/organization/v1/created.proto Outdated Show resolved Hide resolved
@doomspork
Copy link
Contributor Author

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).

@doomspork
Copy link
Contributor Author

doomspork commented Nov 25, 2020

Need to add an events replacement for protos/bottle/notification/order/v1/assembly_failure.proto

Copy link
Contributor

@btkostner btkostner left a 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

protos/bottle/account/events/v1/organization_left.proto Outdated Show resolved Hide resolved
protos/bottle/core/v1/bottle.proto Outdated Show resolved Hide resolved
@doomspork doomspork force-pushed the scallan-zendesk-service branch from 63b92e9 to 7f0876e Compare December 1, 2020 15:32
@doomspork doomspork force-pushed the scallan-zendesk-service branch from 7f0876e to 5cab424 Compare December 9, 2020 16:19
@doomspork doomspork force-pushed the scallan-zendesk-service branch from 5cab424 to d00ca98 Compare December 9, 2020 16:33
string id = 1;
string subject = 2;
string message = 3;
repeated string tag = 4;
Copy link
Contributor Author

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.

Copy link
Contributor

@btkostner btkostner left a 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

@doomspork doomspork merged commit f29e568 into master Dec 9, 2020
@doomspork doomspork deleted the scallan-zendesk-service branch December 9, 2020 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants