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 logic for generating notifications based on organisation number #456

Closed
6 of 9 tasks
Tracked by #203
SandGrainOne opened this issue Feb 29, 2024 · 4 comments
Closed
6 of 9 tasks
Tracked by #203
Assignees

Comments

@SandGrainOne
Copy link
Member

SandGrainOne commented Feb 29, 2024

Description

Add logic to the service logic of notification to support recipient of type organisation number. Use the services already implemented and rewire the logic to include contact information lookup of both official and personal contact information. Make sure the notifications are stored with identified contact information.

Tasks

  • Add contact information lookup to the service logic handling new notification orders
  • Unit tests
  • Review

Acceptance criteria

  • Notification can handle a notifications order with an organisation number by finding the official contact details of the organisation.
  • Notification summary should include both organization number and email or mobile number of org recipient
  • If an official contact number is not registered the response when placing the order should indicate this
  • If an official contact email /number is registered the order should be accepted and processed
  • If an official contact email/number exists at the point of placing the order, but not when the notification is to be sent, it should result in recipient not identified status in the notification summary
  • If an organisation has multiple official contact points, one notification should be generated per contact point.
@acn-sbuad
Copy link
Contributor

testing in AT22.
Looking at the notification details for a sent order, I believe orgNo should be included in the recipient field. For service owner to know which org the email address and sent email is linked to.

    "notifications": [
        {
            "id": "68758e07-05b6-490b-b065-89f231000e75",
            "succeeded": false,
            "recipient": {
                "emailAddress": "4tw8bgez@jei5wp6wx.no"
            },
            "sendStatus": {
                "status": "New",
                "description": "The email has been created, but has not been picked up for processing yet.",
                "lastUpdate": "2024-05-07T15:37:02.193146Z"
            }
        }
    ]

@SandGrainOne
Copy link
Member Author

SandGrainOne commented May 28, 2024

Testing sending in the future with missing contact information at the send time:
OrderId: "152ce64b-fdcf-4d82-bf78-d2e74faac88e"
RequestedSendTime: "2024-05-28T14:30:00+02:00"
Organization: 312508729

Manually deleted the contact information after placing the order. Send time a little bit more than 1 hour into the future when placing the order. Placing a new order fails because of missing contact information.

Test result: Success

@SandGrainOne
Copy link
Member Author

SandGrainOne commented May 28, 2024

AT24

Something weird with order: 5b3c624f-a868-4e51-8d5f-928179669155

{{BasePath}}{{PortNumber}}/notifications/api/v1/orders/{{NotificationOrderId}}/status
Reports succeeded: 0
while
{{BasePath}}{{PortNumber}}/notifications/api/v1/orders/{{NotificationOrderId}}/notifications/email
Reports succeeded: 1
This would be the expected number. Why is it different?

@SandGrainOne
Copy link
Member Author

Testing completed

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

No branches or pull requests

2 participants