FF Schema: User Data Transfer

FF Schema: User Data Transfer

Background

The goal of this doc is to provide FireFly schema design to support User Data Transfer [ref: Profile Data Transfer design doc]. User data transfer is a new Canary feature which allow:

  1. Customer transferring secondary profile to another account in the event of account subscription downgrade.

  2. Transfer anonymous user data (user that doesn’t have amazon account but using Amazon Music) to an account upon sign in. This type of transfer is called GUEST transfer [ref: Ghost: Casper - Tech Strategy].

User data transfer call flow

  1. call prepareUserDataTransfer to generate transferId T1R

  2. sign out if previously login and show login screen T1R

  3. call UserDataTransfer query to show user avatar, name, etc

  4. call startUserDataTransfer when user clicks confirm T1R

  5. Show next screen depends on startUserDataTransfer status T1R

FF Schema

These are the entity types and operations to support user data transfer.

Type

.. gql:enum:: UserDataTransferType

Enum representing the type of user data transfer.

.. gql:enum:value:: PROFILE_TRANSFER

  Transfer of a secondary profile to another account.

.. gql:enum:value:: GUEST_TRANSFER

  Transfer of anonymous user data to an account upon sign in.

.. gql:enum:: UserDataTransferStatus

Enum representing the status of a user data transfer.

.. gql:enum:value:: INITIATED

  The transfer has been initiated but not yet completed.

.. gql:enum:value:: COMPLETED

  The transfer has been completed successfully.

.. gql:type:: UserDataTransfer

Represents a user data transfer operation.

.. gql:type:field:: transferId: String!

  Profile transfer invitation Id.

.. gql:type:field:: transferType: UserDataTransferType!

  Profile transfer type.

.. gql:type:field:: status: UserDataTransferStatus!

  Profile transfer status.

.. gql:type:field:: targetUser: User!

  The user associated with the account or profile to which data is being transferred.

Operation: Mutations

1. prepareUserDataTransfer

This is a mutation to generate profile transfer Id which client will use to start the profile transfer process and check the transfer status.

.. gql:type:field:: prepareUserDataTransfer(profileId: String, transferType: UserDataTransferType!): UserDataTransfer

Generates a profile transfer ID to initiate the user data transfer process.

argument profileId:

Optional profile ID for profile transfers.

argument transferType:

The type of transfer to prepare (PROFILE_TRANSFER or GUEST_TRANSFER).

2. startUserDataTransfer

This mutation is to start profile transferring.

.. gql:type:field:: startUserDataTransfer(transferID: String!): UserDataTransfer

Starts the user data transfer process.

argument transferID:

The transfer ID generated by prepareUserDataTransfer.

Operation: Query

1. userDataTransfer

.. gql:type:field:: userDataTransfer(transferId: String!): UserDataTransfer

Retrieves the status and details of a user data transfer.

argument transferId:

The transfer ID to query.