Map custom fields to NetSuite
Custom field mapping lets you send a value from Chargebee to a custom field on the corresponding NetSuite record. You can map an available Chargebee field or enter a fixed value that applies to every eligible record in the mapping. The record groups include customers, invoices, credit notes, sales orders, items, and payment and refund transactions.
For example, you can map a Chargebee customer custom field named Customer Segment to a NetSuite customer custom field with the same purpose. When the integration processes an eligible customer, the value is sent to NetSuite.
Custom field mapping is different from record mapping, which links existing Chargebee and NetSuite records. To link records instead, see Record Mapping in Oracle NetSuite.
Before you begin
Complete the setup in Configuring Oracle NetSuite, and make sure your user can manage the integration's configuration. Then check the following:
- Create the destination custom field in NetSuite. Confirm that it applies to the target record and, for transaction fields, to the correct header or line-item scope.
- If the source is a Chargebee custom field, create that field in Chargebee as well. Standard Chargebee fields and fixed values do not need this.
- Confirm that the source type and value format are compatible with the destination. For a NetSuite list field, confirm the option identifier with your NetSuite administrator.
- Review existing mappings with your NetSuite administrator or Chargebee Support before you change them, especially mappings that Support configured.
- On a Multi Business Entity site, check whether you are editing the site's mapping or an entity's own mapping. An inherited mapping is read-only in the entity view.
Create a custom field mapping
-
In Chargebee, go to Settings > Integrations > NetSuite.
-
On the integration management page, click Custom field mapping. If no mappings exist, the editor opens directly. Otherwise, click Add record mapping.
-
Under Record pair, select a Chargebee record. The matching NetSuite record is selected for that pair. For example, Invoice maps to Invoice, or to Invoice / Sales order when the invoice-based sales order configuration is active.
-
Under Fields to map, select Header fields or Line-item fields, if both are available. Line-item fields are available only for supported Invoice and Credit note paths.
-
Click Add field or constant mapping, then select Map Custom Field or Map Constant Value.
-
Select the Chargebee source field or enter the constant. Then select the NetSuite custom field that receives the value.
-
Repeat steps 5 and 6 for each additional mapping. Each NetSuite destination can be mapped only once within the selected record pair and scope. If an inline validation message appears, correct it before you save.
-
If you use both header and line-item scopes, review each scope. Then click Save, and reopen the group to confirm the saved mappings.
The field names in the screenshot are examples, not a recommended mapping.
Switching between header and line-item scopes keeps the entries in both views. Saving applies the supported, active sets. If a field does not appear, check the selected record pair and scope.
Record groups in the custom field mapping editor
The editor groups mappings by record:
- Customer
- Invoice
- Credit note
- Sales order
- Item
- Payment transaction
- Refund transaction
Source and destination names can vary with your sync and product catalog configuration. Sales order mappings are inactive when the related sales order sync is not configured. Chargebee keeps inactive mappings but does not apply them. Invoice line-item mappings apply when an invoice is exported, not when a sales order is exported.
Refund mappings in custom field mapping
You can view or delete existing refund mappings. [unverified] New or changed refund destinations are not available in the editor. To set up a refund destination, contact Chargebee Support.
Header and line-item values
A custom field mapping uses one of four value types, depending on the scope and whether the value comes from a Chargebee field or a fixed value.
| Mapping | How the value is used |
|---|---|
| Header field | Sent once for the whole record. |
| Line-item field | Sent for the corresponding exported line. |
| Header fixed value | The same value is sent once for each eligible record. |
| Line-item fixed value | The same value is sent on each supported exported line. |
The Chargebee fields you can select depend on the record pair, scope, and integration configuration.
For supported Invoice and Credit note line mappings, a subscription custom field is read from the subscription linked to that line. A line without the required subscription or custom field metadata cannot provide that value, and Chargebee does not substitute another line's value. Fixed line-item values do not require subscription metadata.
Handle missing and blank values
If a mapped value is missing, Chargebee may omit the destination field. For a required destination, NetSuite may apply its own default or reject the record. A missing value does not always cause a sync failure, so check the NetSuite field configuration and the sync result.
An optional header text field is an exception. A blank source text value can be sent as an empty string, which clears the NetSuite field. A blank subscription line value, or a blank optional non-text header value, is omitted. Review existing values, and test the mapping on a Test Site before you apply it to production records.
Send amounts and list values to NetSuite
Mapped amount values are sent in the smallest unit of the record's currency. This mapping does not convert them. For example, USD 10.00 is sent as 1000, and a zero-decimal currency such as JPY is sent as is. Confirm that the destination field is intended to store amounts in that unit. This does not change the integration's normal transaction amount conversion.
For NetSuite list fields, use the option's internal ID where the editor asks for it. Class, department, and location tracking mappings can use their configured name-matching behavior. Multi-select fields are not supported by this mapping editor.
Map a Chargebee customer field to a NetSuite customer field
Suppose you have a Chargebee customer custom field named Customer Segment, and a NetSuite customer custom field with the same purpose.
- Select the Chargebee Customer and NetSuite Customer record pair.
- Click Add field or constant mapping, and then select Map Custom Field.
- Select the Chargebee Customer Segment field as the source.
- Select the NetSuite Customer Segment custom field as the destination.
- Click Save.
- Process an eligible customer through the integration, and then check the custom field on the NetSuite customer record.
To send the same value to every eligible record instead, select Map Constant Value and enter the value, such as enterprise. For a NetSuite list field, use the option's internal ID rather than its display label.
Inherit custom field mappings from the site for a business entity
For an eligible business entity connected through a site-level NetSuite integration, the Inherit custom field mappings from site switch in Advanced Sync Rules chooses which complete set of mappings the entity uses. The custom field mapping editor is not an advanced sync rule. Only the inheritance switch is part of Advanced Sync Rules.
- On: The entity uses the site-level custom field mappings. Its Custom field mapping page shows the inherited mappings as read-only. Edit the mappings at site level instead.
- Off: The entity uses its own mappings. The site and entity sets are not combined field by field. Review the entity-specific configuration before you switch.
To use the site mappings for an entity:
- Select the eligible business entity, and open Manage Advanced Sync Rules.
- Turn on Inherit custom field mappings from site, and then click Save.
- Reopen Custom field mapping in that entity to review the inherited mappings.
If no site mapping is configured, the entity has no site mapping to use. Saving the switch does not start a sync. Verify the effect on an eligible record after the next sync.
If the switch is unavailable, contact Chargebee Support to check eligibility and feature availability. To use the entity's own mappings instead, turn the switch off, and confirm that the intended entity mapping is configured before you process records.
Edit or delete a custom field mapping
- Open Custom field mapping, and find the record group.
- Click Edit mappings.
- Change a source or destination, add a row, or remove an editable row.
- Click Save, and then reopen the group to review the result.
The record pair cannot be changed after you create it. To change the pair, click Delete record mapping, review the confirmation, and confirm. Then create a new group for the different pair. Deleting a record mapping removes the editable mappings for that pair. Inactive mappings are kept. Chargebee may block removal of mappings that the sales order sync requires, so review the impact before you confirm.
Saving a change does not start a sync or rewrite previously synced records. The new mapping applies to eligible records that are processed later. Click Sync Now, or wait for the next scheduled sync, and then verify the result in NetSuite.
Troubleshoot custom field mappings
Resolve NetSuite field definitions that do not load
A warning appears when Chargebee cannot retrieve some NetSuite field definitions. Insufficient custom field permissions are one possible cause. A connection problem or another metadata error can also prevent loading. Saved mappings are kept. Affected fields show Field unavailable, and groups whose field definitions loaded can still be edited.
- Check that the NetSuite connection is working.
- Ask your NetSuite administrator to grant the integration the permissions it needs to read the relevant custom field definitions.
- Click Retry in the warning. Retry reloads field information. It does not delete your saved mappings.
- Check whether the affected fields now load. The warning clears when the loading errors are resolved. If it remains, check the remaining errors or contact Chargebee Support.
A field can also show as unavailable when it does not exist, or when it does not apply to the selected record pair and header or line-item scope. Check those details if the field is still missing after a successful reload.
Resolve a mapping that cannot be saved
Check that the source type, value format, length, and destination are compatible. Remove any duplicate mapping for the same destination within the selected scope. For list fields, confirm the expected NetSuite option identifier. Follow the validation message, and then save again.
Resolve a missing mapped value or a failed sync
Check the source value on the affected Chargebee record, and confirm that the destination applies to the selected scope. For a subscription line field, confirm that the line has the correct subscription and that its custom field metadata is available.
Review the NetSuite sync result. A missing required value may be filled by a NetSuite default, or it may cause a rejection. If the record is rejected, correct the source or destination configuration, and then retry the affected record. If the sync succeeds, check the corresponding header or line in NetSuite.
Resolve an inherited mapping that cannot be edited
If Inherit custom field mappings from site is on for an eligible entity, the entity's mapping page shows the site mappings as read-only. Make changes at site level, or turn off the switch in Advanced Sync Rules to use the entity's own mappings. Confirm the intended configuration before you process records. For the switch's behavior, see Inherit custom field mappings from the site for a business entity.