On Key Contacts tab in Admin, allow Bill To / Sold To data to be edited

Proposal

Add the BillingAccountContact model to the CustomersDot Admin:

  • Add BillingAccountContact to the CustomersDot Admin:
    • Add behind the key_contacts_management_admin feature flag
    • Only admins with customer_read_write access can manage/edit billing account contacts in Admin.
    • Add references to the key contacts to the BillingAccount Show page:
      • Sold To
      • Bill To
      • Billing Account Contacts
    • Admins can Edit / Sync / Create (from id) Billing account contacts.

🐾 DELIVERY PLAN

  • Add BillingAccountContact to the CustomersDot Admin readonly: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7188

    • Add section with readonly actions (Index | Show + Auditing)
    • Add key contact attributes to the BillingAccount Show view
  • Implement Sync BillingAccountContact to Zuora Service: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7548

  • Implement the Admin Edit action for BillingAccountContact: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7338 https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7555

  • Implement the Admin Sync action for BillingAccountContact: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7314 & https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7316

  • Implement the Admin Create from id action for BillingAccountContact: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7231

  • Adjust BillingAccountContact validations to match Zuora: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/7454


Old Proposal

⚠ We have decided to stop using Zuora to fetch the Contacts every time but instead cache these on the CustomersDot end as ActiveRecord models. Resulting from this the implementation of the Contacts in the Admin is updated to follow the rails admin default pattern.

The Key Contacts section of BillingAccount page in CDot Admin will be implemented as part of Admin ability to view Bill To/Sold To Zuora Con... (#5667 - closed). This will only allow viewing of contact information. As part of this issue, let's add the ability to edit the Bill To / Sold To contact data.

We should implement a form with similar functionality as Zuora's form, notably the ability to designate the Sold To Contact as the same as the Bill To Contact. The BillingAccountContact model (which is the caching layer for Zuora Contacts) should be used to load data for this form. Updating this form should save to this model and sync back to Zuora.

UPDATE as of 2023-04-06: The implementation of this form is blocked based on new requirements for caching Billing Account Contacts in CDot. This issue is blocked on Implementation of BillingAccountContact (#6067 - closed).

Notes

  • This change should be behind the feature flag, key_contacts_management_admin.
  • Only admins with customer_read_write access should be able to manage/edit contacts in Admin. Other admins only have read access.
Edited Jun 21, 2023 by Vladlena Shumilo
Assignee Loading
Time tracking Loading