Introducing the Chargebee CLI

Troubleshooting Sync Errors

Overview

There are different types of errors that can occur when the Chargebee-HubSpot integration sync runs. Errors that stall the entire sync job are called job-level errors, while errors that prevent only specific records from syncing are called record-level errors. We provide the possible causes of some of these errors and ways to fix them on this page.

How a subscription syncs to a HubSpot deal

This sequence applies to HubSpot Quote-to-Cash. The HubSpot Legacy integration (Hubspot Chargebee Actions) does not create deal line items.

When Sync Subscriptions from Chargebee to HubSpot creates or updates a deal for a subscription, Chargebee runs three stages in order. Each stage starts only if the previous one succeeded. After the sync finishes, the subscription shows Success in the sync log only when the deal, its line items, and the deal amount were all written.

Click Apps > Go to Marketplace > Sales & CRM, click HubSpot Quote To Cash under Apps connected, then click View sync log. Filter by Chargebee Object = Subscription and Sync Status = Error to find deal and line-item failures. Read the sync message to see which of those stages failed. An amount that was not written does not appear under Error; Chargebee retries it on the next sync.

StageWhat Chargebee doesIf this stage fails
1 — DealCreates or updates the deal in HubSpot and associates it with the mapped contact and company.Sync log status is Error. HubSpot ID is empty when Chargebee was creating the deal and no deal id was returned. When Chargebee was updating a deal that already exists, HubSpot ID still shows that deal. Read the sync message to confirm this is a deal failure.
2 — Line itemCreates deal line items in HubSpot and links them to the deal.Sync log status is Error. HubSpot ID shows the deal ID because Stage 1 already succeeded.
3 — AmountUpdates the deal amount from the line items, using Choose the value that you want to sync into the Deal Amount field in HubSpot (Total Contract Value, Annual Contract Value, Annual Recurring Revenue, Monthly Recurring Revenue, or Do not sync).The subscription is not listed as Error. The deal and line items stay in HubSpot, and Chargebee retries the amount on the next sync. See Retry behavior for subscription-deal sync.

Stage 1 — Deal

Typical sync messages mention a missing or invalid deal pipeline or stage, for example:

HubSpot API error: Pipeline specific does not contain stage closedwon [correlationId: …]

What to do

  1. In Chargebee, open Manage sync preferences for HubSpot Quote-to-Cash and review Select the pipeline where Deals should be synced and the deal stages. See Sync Subscriptions from Chargebee to HubSpot.
  2. In HubSpot, confirm those pipeline and stage names still exist and match your configuration.
  3. Save your sync preferences and retry the subscription from the sync log.

See also Pipeline or stage errors (job-level) and subscription API errors.

Stage 2 — Line item

Contact and company associations are handled in Stage 1. Stage 2 creates the subscription's line items on the deal in HubSpot.

Typical sync messages name the deal and the HubSpot products that could not be found, for example:

Line items creation failed for deal <deal-id>: HubSpot could not sync this group of deal line items because these products were not found: <product-id>.

What to do

  1. Note the product ID in the message (or open the deal in HubSpot and review its line items).
  2. Confirm the subscription's plans, addons, and related catalog items exist as products in HubSpot. Use the product ID in the subscription row's sync message, or open the deal in HubSpot to verify line items; resolve missing or deleted HubSpot products, then retry the subscription sync.

Deal line items depend on matching HubSpot Product records. Fixing missing products in HubSpot usually clears Stage 2 errors on retry.

Stage 3 — Amount

After line items are created, Chargebee writes the deal amount using Choose the value that you want to sync into the Deal Amount field in HubSpot. This step runs shortly after the line-item step finishes.

If the amount is not written, the deal can show line items in HubSpot while the amount is still wrong or empty. That subscription is not listed as Error. Wait for the next sync while autosync is on, or click Sync Now on HubSpot Quote-to-Cash.

Retry behavior for subscription-deal sync

Failed stageAutomatic retryManual retry
Stage 1 (Deal) or Stage 2 (Line item)Chargebee retries these Error rows about once every 24 hours while autosync is on. A subscription that changes sooner is included in the next sync.Select the row in the sync log and choose Retry Sync from the menu (…).
Stage 3 (Amount)Chargebee retries the amount on the next sync while autosync is on. The row is not listed under Error while it is waiting.Click Sync Now on HubSpot Quote-to-Cash. Retry Sync applies only to rows that appear in the sync log.

Automatic retries run only while autosync is on for HubSpot Quote-to-Cash. Click Sync Now to run a sync immediately. Retry Sync applies only to rows that appear in the sync log.

Job-Level Errors

These errors prevent the sync job from running. Follow the steps below in Chargebee to see any job-level errors:

  1. Click Apps > Go to Marketplace > Sales & CRM.
  2. Select Hubspot Chargebee Actions under Apps connected.
  3. A Sync Health card is displayed, unless a sync is currently underway.
  4. Any job-level errors appear on a banner above the Sync Health card. (See 1 in the screenshot below.)

The following sections describe a few job-level errors which you can troubleshoot:

Pipeline or stage errors

Error Message: A pipeline or stage configured in Chargebee was not found in HubSpot. Review your sync preferences and try again.

Reason: The pipeline or stage configured in your HubSpot sync preferences in Chargebee was not found in HubSpot. This can happen when the pipeline or stage is renamed or deleted in HubSpot.

Solution: Check the pipeline and stages selected in your HubSpot sync preferences in Chargebee. Select the appropriate values from the dropdown menus.

Authentication error

Error Message: Sync has failed due to a non-fatal condition. Chargebee will recover and retry sync automatically.

Reason: The integration failed to authenticate.

Solution: Click on Sync Now to try rerunning the sync a couple of times. Contact support if the error persists.

Internal error

Error Message: Sync failed due to an internal error. Retry after some time.

Reason: This error can occur due to various reasons such as integration outage/downtime and API rate-limit breaches.

Solution: Retry sync after a few minutes. Contact support if the error persists.

Record-Level Errors

These errors occur when the integration tries to sync individual records from Chargebee to HubSpot. Follow the steps below in Chargebee to see the list of record-level errors:

  1. Click Apps > Go to Marketplace > Sales & CRM.
  2. Select Hubspot Chargebee Actions under Apps connected.
  3. Unless the sync is currently underway, a Sync Health card is displayed.
  4. To see record-level errors, either click on View errors in current sync or View all. (See 2 in the screenshot above.)

The sections below explain some common record-level errors you may encounter:

Customer Record Errors

This sub-section explains record-level errors pertaining to customer records in Chargebee.

PII data cleared

Error Message: PII data is cleared.

Status: Ignored

Reason: The customer's personally identifiable information has been marked for deletion or has been deleted.

Solution: Re-create the customer record in Chargebee.

Contact already mapped

Error Message: Associated contact in HubSpot is already mapped to a different Chargebee customer

Status: Failed

Reason: In HubSpot, two Contacts cannot have the same value in the email address field. However, duplicate values are allowed for email addresses in Chargebee customer records. This error occurs when the customer record in Chargebee has an email address that matches a HubSpot contact previously mapped to another Chargebee customer record.

Example

Say a customer record A in Chargebee was synced to HubSpot and was mapped to contact C with the matching email address. Later, this error occurs when say, a different customer record B syncs to HubSpot and has the same email address as the contact C.

Solution: Edit the affected customer records in Chargebee to ensure that they have different values for the email address field.

Contact not found

Error Message: No matching contact found in HubSpot.

Status: Failed

Reason: No matching contact was found in HubSpot for the customer record in Chargebee. Also, this error occurs when Do nothing is selected for the configuration setting Choose what happens when a customer in Chargebee does not have a matching contact in HubSpot.

Solution: Perform one of the following actions:

Create a contact in HubSpot with the unique field value matching the value of the unique field in the Chargebee customer record and rerun the sync.

Change the configuration setting mentioned above to Create contact and rerun the sync. This produces the same effect as the previous option except that it applies the solution to all customer records affected by this error.

Ignore the error if you don't want to sync the particular customer record to HubSpot.

Contact missing

Error Message: Could not find HubSpot Contact associated with Chargebee Customer ID.

Status: Failed

Reason: This error occurs when a previously mapped HubSpot contact is deleted. The mapped Chargebee customer record has changed since the last sync and now fails to sync to HubSpot due to the missing contact.

Solution: Perform one of the following actions:

If...Then...
the HubSpot contact was deleted in error,re-create the contact ensuring that the value of the unique field matches that of the unique field in Chargebee.
the customer record in Chargebee is no longer valid,delete the customer record in Chargebee.

Unique field value missing

Error Message: not available. ( can be "email address", "phone", "company", or custom fields for the Customer record in Chargebee.)

Status: Failed

Reason: This error occurs when the value for the unique field in the customer record in Chargebee is missing.

Solution: Edit the Chargebee customer record and fill in the appropriate value for the unique field.

Customer deleted

Error Message: Customer deleted at Chargebee.

Status: Deleted

Reason: The customer record in Chargebee that was mapped to the HubSpot contact given by was no longer found in Chargebee.

Solution: Retry sync after a few minutes. Contact support if the error persists.

Perform one of the following actions:

If...Then...
you want a deal to be automatically created,set When a subscription is created in Chargebee to Create deal.
you want to create the deal yourself,create a deal under the matching contact in HubSpot.

Unknown Error

Error Message: Failed to update contact in HubSpot.

Status: Failed

Reason: The record sync failed due to an unknown error.

Solution: Retry sync after a few minutes. Contact support if the error persists.

Subscription Record Errors

This sub-section explains record-level errors pertaining to subscription records in Chargebee. For how deal creation, line items, and amount updates run in sequence, see How a subscription syncs to a HubSpot deal.

No open deal found

Error Message: Deal sync failed due to no open deals.

Status: Failed

Reason: This error only happens when the sync rule When a subscription is created in Chargebee is set to Update existing. The error indicates that no open deal (deal with probability < 100%) was found to sync to.

Solution: Perform one of the following actions:

If...Then...
you want a deal to be automatically created,set When a subscription is created in Chargebee to Create deal.
you want to create the deal yourself,create a deal under the matching contact in HubSpot.

Customer not synced

Error Message: Dependent customer is not yet synced

Status: Failed

Reason: Every subscription in Chargebee is associated with a customer record and the latter must sync to HubSpot before the subscription can sync successfully. This error happens when the related customer has not synced to HubSpot.

Solution: Since the customer has not synced, a customer-level error must have occurred. Look for the error and fix it.

Unknown error

Error Message: CB Internal error

Status: Failed

Reason: The subscription failed to sync due to an unknown error.

Solution: Retry sync after a few minutes. Contact support if the error persists.

API errors

Error Message: Creation/updation of deals failed :

Status: Failed

Reason: The subscription failed to sync because of API errors while communicating with HubSpot.

Solution: Retry sync after a few minutes. Contact support if the error persists.