Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • First buy on Home Delivery - : In first buy of user, the value to user can pay with physical payments will have a limitation, e.g. $30.00

  • Buy on Home Delivery - : In second or more buy of user, the value to user can pay with physical payments will have a limitation, e.g. $50.00;

  • Prevent Repeat Failures - : In cases where the last order involved a physical payment method and was marked as a delivery failure, the next order from the same user will be restricted to only online payment methods.

    • Delivery failure motives:

      • Wrong address

      • Customer was not there

      • Fake order

      • Problems with payment

...

We will create a new screen on DOP and the user can choose and manipulate the "rules" “rules” to one or many restaurants. This information will be save on Sanity and the WL-app get these values when choose the restaurant, so the WL-app can verify if allow or not the payment by physical method.

...

  • Store this information in restaurant on Sanity;

    • Main local to store information about restaurant;

    • The information in Sanity is only ready-only, to change this information is only by DOP.

...

  • Manipulate this information on DOP (FZ-portal);

    • Create a new page with this information;

    • Create rules of access in this page, reference here;

    • The users can choose which rules they want to use;

    • The users can adjust the limit values to purchases in home delivery;

    • The users can make this to your restaurants;

    • The franchisees can change this information as well;

...

  • WL-app control the exhibition of physical payments;

    • With rules, the WL-App can validate if some rule is active and if need to hide physical payments;

    • This control is by each user;

      • In moment of payment the WL-app can get the information of the last delivery order of user (getUserOrders), and there are the restaurant information with the limitation rules, so we need to create a logic with this information and in case some limitation is true the physical payment is hidden.
        For example, is the first purchase of user of home delivery type, we know this because the getUserOrders query return 0 order of this type, and the restaurant selected has a limitation that the first purchase need have a limit of $30.00, we know this because the restaurant return this information of Sanity, and we have the order value in this screen because there are the order with the total value at this moment. So with all this information, the WL-app is able to hide or not the physical payments.

image-20240529-170137.png

Consequences

  • Create a new field in Restaurant Document on Sanity to receive this information;

  • Create a new screen on DOP (FZ-Portal) to user can manipulate this information and to send to Sanity;

    • Use the Sanity Client Lib to get and save information on Sanity, this lib already available on DOP.

  • Create a new logic on WL-App in payment page to control the exhibition of according the information and limitation that get of Restaurant;

...