Spike: Create proposal for caching mechanism for BillingAccount Contacts

Problem

We know that Zuora Account Contacts are used frequently in CustomersDot, most importantly the Sold To Contact. The Sold To Contact is the person who receives licenses or activations codes, or other notifications from CDot. The Sold To Contact information is also used to find or create CDot Customer record when processing Subscription/Order related callouts from Zuora.

Proposal

Given their importance, we could consider creating a model for BillingAccount Contacts and caching this data from Zuora in CDot. This could function similarly to what we've built for BillingAccount in that we persist just the data needed for CDot.

To keep the data in CDot in sync with Zuora, a custom event with its own callout could be created for Contacts. A similar custom event and callout mechanism was created for BillingAccounts and would serve as a model for this new purpose. The syncing mechanism for Bill To and Sold To will differ a bit from Billing Account because the bill_to_id and sold_to_id live on the billing_account which we want to keep in sync, but also the contact data itself.

Considerations

  • Consider whether to cache all Zuora contact information in CDot or just the Bill To and Sold To. I suspect it will be the latter but worth debate.
  • Contact information is currently help on the Customer model for paid customers at the moment. If we introduce a contact model in CDot, these contact fields on Customer should not be used once the Customer converts to a paid Customer (e.g. has a BillingAccountMembership).

Result

The outcome of this issue should be a proposal for caching billing account contacts in CDot. Ideally this could be an issue, or set of issues if the work is large enough. This proposal could be added to the overall proposal documentation for Bill To / Sold To Contact management.

Edited Mar 08, 2023 by Tyler Amos
Assignee Loading
Time tracking Loading