/
[Solution] Show order phone number in admin tool

[Solution] Show order phone number in admin tool

Document Status

REVIEWED

Closing date

 

Document Owner(s)

@Macedo Ferreira, Samuel

Reviewers

@Goncalves, Felipe
@Augusto Romao, Vinicius
@Capovilla, Evandro
@Raphael Ferreira Gomes
@Ouyang, En

Epic Link

https://rbictg.atlassian.net/browse/IBFEC-2794

Figma Link

https://www.figma.com/design/Ti8Qr6jeSEPaencIDyYfcJ/branch/20qsLOwGIwHajxKTTrVpOp/Burger-King?node-id=3003-34599&m=dev

Potential Solutions

Assumptions

  • Admin Tool does not provide the phone number information provided by the customer during the ordering process.

  • Customer is not required to register a phone number in their profile.

  • In some regions the phone number may always be empty.

  • Customers may provide different numbers for each order.

  • If the Profile phone number is not provided it will be shown three dashes or points according to the brand design.

Proposed Solution

Get the user's phone number from the customer data and order phone number from the order data.

Show Phone Number - Workflow

The workflow is basically an order flow where the FetchOrder query is fetched, then the phone number is read from Dynamo DB and then it is returned to the Admin Tool to be displayed on screen.

title Show Phone Number participant Admin Tool participant Graphql participant DB Admin Tool->Graphql: FetchOrder Graphql->DB: Read phone number DB->Graphql: Return phone number Admin Tool<-Graphql:Display phone number

For more references:

Pros:

  • Quick implementation.

Order and Profile phone number added to Order Details Card table

Proposal

Update FetchOrder query

  • Add phoneNumber to dropoff and customer

export const FetchOrder = gql` query Order($rbiOrderId: String!) { Order(rbiOrderId: $rbiOrderId) { id: rbiOrderId __typename ... customer { ... phoneNumber } delivery { ... dropoff { ... phoneNumber } ... } } ${CartEntryFragment} `;

Update Dropoff interface

  • Add phoneNumber to the Dropoff in services/graphql/src/schemas/orders.ts and run yarn types.

Add phone number info to the table

const OrderDetailsCard = ({ order, loading, isRefundEligible, }: OrderDetailsProps & RefundEligibilityProps) => { ... return ( <Card variant="outlined"> ... <Table> <TableBody> ... <TwoColumnTableRow headerText={formatMessage({ id: 'loyaltyCartDetails.customerPhoneNumber' })} loading={loading} empty={!order?.delivery?.dropoff?.phoneNumber} value={order?.delivery?.dropoff?.phoneNumber} /> <TwoColumnTableRow headerText={formatMessage({ id: 'rderDetails.phoneNumber' })} loading={loading} empty={!order?.customer?.phoneNumber} value={order?.customer?.phoneNumber} /> ... </TableBody> </Table> </Card> ); }; export default OrderDetailsCard;

Add new translations

  • loyaltyCartDetails.customerPhoneNumber: Profile phone number.

  • orderDetails.phoneNumber: Order phone number.

Configuration

No feature flags are needed as this solution does not impact any existing processes and does not significantly change the support tool UI.

Delivery Plan

  • Update query and interface

  • Add new fields table

  • Add new Lokalise translations

QA Plan

Scenario

Condition

Result

Scenario

Condition

Result

Profile Phone Number and Order Both Phone Numbers populated

The user has filled profile phone number on sign-up/ editing his account and filled phone number during the delivery order process.

Both Profile Phone Number and Order Phone Number should have values different or equal values

Order Phone Number populated.

The user did not fill out his profile phone number when signing up or editing his account, but he/she did fill out the phone number during the delivery order process.

Only the Order Phone Number should have a value and the Profile Phone Number should show empty line validation

Profile Phone Number populated

The user has filled out his profile phone number when signing up or editing his account, but he/she has not filled out the phone number because it is a non-delivery order.

Only Profile Phone Number should have a value and Order Phone Number should show empty line validation

No Phone Number populated

The user did not fill out his profile phone number when signing up or editing his account, and he did not do so because it was a non-delivery order.

Both Profile Phone Number and Order Phone Number should show empty line validation

Non-delivery: can be a pickup, dine in, drive thru or any other that is not a delivery type.

Call-outs

https://www.figma.com/design/Ti8Qr6jeSEPaencIDyYfcJ/branch/20qsLOwGIwHajxKTTrVpOp/Burger-King?node-id=3176-13800&t=2KAGZQ6XmCFFg5YX-0

Related content

[Opportunity] Show Order Phone Number in AdminTool
[Opportunity] Show Order Phone Number in AdminTool
More like this
[Solution] Allow Payment Methods v2
[Solution] Allow Payment Methods v2
Read with this
Tech Refinement - search customer by phone (Admin tool)
Tech Refinement - search customer by phone (Admin tool)
More like this
Allow Payment Methods Control in DOP
Allow Payment Methods Control in DOP
Read with this
[Test Report] Show Order Phone Number in AdminTool
[Test Report] Show Order Phone Number in AdminTool
More like this
[Solution] Support Tool Integration with Homeria API for Email Data Synchronization
[Solution] Support Tool Integration with Homeria API for Email Data Synchronization
Read with this