Sequence Diagram for the Amazon Locker Service

Create a sequence diagram for product return in the Amazon Locker system.

We'll cover the following

Sequence diagrams are a great way to understand the interactions between different entities and objects in the system. There can be different sequence diagrams that we can create for our Amazon Locker system. In this lesson, we will create sequence diagrams for the following interaction.

Return package

The sequence diagram for the package return should have the following actors and objects that will interact with each other:

  • Actor: Customer

  • Object: Locker

  • System

Here are the steps in the return package interaction:

  1. The customer requests the system to return a package.

  2. If the package return request is approved:

    1. The system requests an available locker.

    2. The locker is returned to the system.

    3. The system sends an OTP code to the customer.

    4. The customer verifies their code.

    5. If verification is successful:

      1. The system assigns a locker to the customer.

      2. The customer places their package in the locker.

    6. Else:

      1. The customer receives an error message.

  3. Else, if the package return request is not approved:

    1. The customer is informed that the return request is not approved.

Based on the order above, the sequence diagram of package return in the Amazon Locker system is given below:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.