Troubleshooting: Duplicated Agreements in Club OS

Introduction

If there are duplicate active member accounts in Club Hub, Club OS can end up with many of the same copies of a single agreement. This will cause Analytics and Reporting data to be incorrect. This article is intended to explain how the issue occurs so that support agents can determine if a customer's issue is caused by this circumstance and explain it to them.

 

What the issue looks like

In Club OS, there are multiple copies of the same agreement ID.

2022-01-31_12-17-11.jpg

In Club Hub, there are multiple active members with the same contact info.

 

Background

This issue is unique to the Club Hub integration due to Anytime's concept of a Pending Membership. This is essentially a temporary membership that is created at the time of the sale that is later replaced in Anytime's system with the 'real' membership (and the pending membership is no longer visible in Club Hub or in their API data). Pending Memberships can have a duration anywhere from less than a day to up to 30 days. The Pending Membership and the real membership do not share any link or common identifiers. Because we do not want to add two memberships to Club OS for a single sale (Pending Membership + real membership), we have logic in place to do the following: 

  1. Add the Pending Membership to our system at the time of sale so that analytics and reporting can accurately show that a close happened and a membership was purchased. 
  2. Remove the pending membership when it is replaced with the real membership.
    1. When we get a membership from AF we:
      1. Check to see if the most recent membership is a pending membership.
      2. If so, we will delete the pending membership and replace it with the real one if the sale dates are less than 30 days apart.
      3. If not, we look up the agreement by sale date and Club Hub agreement ID.
        1. If we find it, we do not add a new agreement.
        2. If we don't find it, we add a new agreement.

How duplicates are created

This is easiest to explain with an example (different colors represent different integration sync cycles): 

  1. There are two accounts for Member Mary in Club Hub. Both have been sold pending memberships on 1/1/22, and one now has a real membership.
  2. So we have Real Membership 123 and Pending Membership 456
  3. Real Membership 123 exists in Club OS.
  4. We do a sync with Anytime Fitness and get Pending Membership 456 in the data.
  5. We check to see if the most recent membership is a Pending Membership. 
    1. In Mary's case, no, the most recent membership is Real Membership 123.
  6. Now we check to see if there is an existing membership 456 sold on 1/1/22 in our system.
  7. There is not, so we add Pending Membership 456 to our system.
  8. Now Mary has 2 agreements in our system. 
    1. Real Membership 123
    2. Pending Membership 456
  9. We do a sync with Anytime Fitness and get Real Membership 123 in the data.
  10. We check to see if the most recent membership is a Pending Membership.
    1. Now the answer is YES, the most recent membership is Pending Membership 456.
  11. We now replace Pending Membership 456 with Real Membership 123.
  12. Mary has 2 agreements in our system.
    1. Real Membership 123
    2. Real Membership 123
  13. We do a sync with Anytime Fitness and get Pending Membership 456 in the data.
  14. We check to see if the most recent membership is a Pending Membership.
    1. In Mary's case, no, the most recent membership is Real Membership 123.
  15. Now we check to see if there is an existing membership 456 sold on 1/1/22 in our system.
  16. There is not, so we add Pending Membership 456 to our system.
  17. Now Mary has 3 agreements in our system.
    1. Real Membership 123
    2. Real Membership 123
    3. Pending Membership 456
  18. This process will continue (adding another agreement) until the Pending Membership is no longer Active.

Prevention and correction

  1. Ideally, it's best to prevent this issue from happening by ensuring that duplicate active members are not created in Club Hub.
  2. If the issue is actively occurring (duplication is still happening), the duplication can be stopped going forward by setting the Pending Membership to Inactive.
  3. Existing duplications of memberships in Club OS can be cleaned up manually by archiving them. This will remove them from analytics and reports.