Customer

|-/redux
    |
    |-/customer
        |- index.ts
        |- customerSlice.ts
        |- customerThunks.ts
Initial State
const initialState: SliceState = {
  data: {
    uid: '',
    email: '',
    external_uid: '',
    program_uid: '',
    status: '',
    kyc_status: null,
    total_balance: '',
    created_at: '',
    locked_at: null,
    lock_reason: null,
    pii_confirmed_at: null,
    details: {
      first_name: null,
      last_name: null,
      dob: null,
      phone: null,
      ssn_last_four: null,
      address: {
        street1: null,
        street2: null,
        city: null,
        state: null,
        postal_code: null,
      },
    },
  },
  isLoadingCustomerData: false,
  customerCheckingAccountProduct: {
    uid: '',
    status: '',
    activated_at: null,
    customer_uid: '',
    customer_email: '',
    product_uid: '',
    product_name: '',
    program_uid: '',
  },
  isLoadingCustomerCheckingAccountProduct: false,
};
Selectors
  • getCustomer: Retrieves the data object from the state that represents the customer data.

  • getCustomerStatus: Retrieves the customer status.

  • getCustomerDetails: Retrieves the customer PII details.

  • getIsLoadingCustomerData: Whether the customer is being requested or not.

  • getCustomerCheckingAccountProduct: Retrieves the customer bank account product.

  • getIsLoadingCustomerCheckingAccountProduct: Whether the customer bank account product is being requested or not.

Thunks

getCustomer

This thunk performs the request to get Customer's personal information and status. This action is called in different flows or helpers inside the baas module. The following modules triggers the helper that triggers this action:

  • Go to Baas X Auth to see how this functionality is linked.

updateCustomer

This thunk performs the request to update the customer's personal information. This action is by default intented to be called from PiiOnboarding module's edit profile section.

Go to Baas X PiiOnboarding to see how this functionality is linked.

Last updated