Skip to content

Automatic Identification

This sample demonstrates how an e-commerce platform can automatically offer MyPup delivery during checkout. The customer proceeds through the regular checkout flow by entering their email address and delivery address. Based on this information, the platform determines whether MyPup delivery is available and whether the customer can be matched to an existing MyPup account.

If a valid match is found, the customer can choose MyPup delivery. If no match is found, the customer can create a MyPup account, provide a valid MyPup delivery code, or continue with regular home delivery.

Flow

  1. The customer enters their checkout information, including email address and delivery address.
  2. Determine whether the provided delivery address is eligible for MyPup delivery using a call to /V1/PickupPoints/GetPickUpPoints. See also GetPickUpPoints. The returned data should be used to verify whether the customer's address belongs to a building or address range serviced by MyPup.
    1. If the address is not serviced by MyPup, verify whether the entered address is a known MyPup hub address using /V1/PickupPoints/GetDeliveryAddresses.
    2. If the address is serviced by MyPup, or if the address matches a MyPup hub address, validate the customer using /V1/Accounts/CheckAccountDeliveryDetails. The customer can be identified using either a MyPup delivery code or a registered email address.
      1. If no matching MyPup account is found, display an error message and present the customer with the following options:
        • Provide a valid MyPup delivery code.
        • Create a MyPup account.
        • Continue with regular home delivery.
      2. If a matching MyPup account is found, retrieve the customer's MyPup delivery details from the validation response.
    3. If the address is neither serviced by MyPup nor a known MyPup hub address, continue with regular home delivery and end the MyPup validation process.
  3. Populate the shipment label using the customer's MyPup delivery code in the agreed label field (for example the recipient name field).

    Warning

    The MyPup delivery code must not be displayed to the customer anywhere in the checkout flow.

  4. Create the shipment using the customer's assigned MyPup hub address as the delivery destination.

  5. Send shipment and tracking information to MyPup using the agreed partner-specific endpoint /V1/Logistics/CreateExpectedDelivery/{CarrierName}.

    Note

    This endpoint will be created on your request, ask your contact person for this.

  6. When the shipment arrives at the MyPup hub, MyPup will provide status and tracking updates back to the carrier using the agreed callback URL. Status updates continue until the shipment has been collected by the customer.

Flowchart

flowchart TD
    A[Customer enters email and delivery address] --> B{Address serviced by MyPup?<br/>GetPickUpPoints}
    B -- No --> C{Known MyPup hub address?<br/>GetDeliveryAddresses}
    C -- No --> H[Regular home delivery]
    B -- Yes --> D{Matching MyPup account?<br/>CheckAccountDeliveryDetails}
    C -- Yes --> D
    D -- No --> E[Show error and offer options:<br/>enter delivery code, create account,<br/>or regular home delivery]
    D -- Yes --> F[Put delivery code on label<br/>and ship to MyPup hub address]
    F --> G[Send shipment to MyPup<br/>CreateExpectedDelivery]
    G --> I[MyPup sends status updates<br/>to the callback URL]