---
schema_version: "1"
id: 414dbacf80491e617f546a34fb4922b0e81b616bae5c563f03e45fd242b64eb6
title: Capture Preferred Transaction Details by Using Custom Fields
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/billing_custom_field_support.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.billing_custom_field_support.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 27a996adf269cb05291b206c4885ebac0c195183ce2bdb9d79c0e088efa9ac72
description: To meet specific business requirements, populate custom field data from orders or external transactions to corresponding billing schedule, billing schedule group, and billing schedule group relationship records. Use Context Service to define how data must be transferred by configuring a custom intracontext mapping. Then, use the Create Billing Schedules for Orders API or the Create Standalone Billing Schedules API to generate billing schedules and billing schedule groups. You can also use custom fields to override the standard fields in billing nodes by using the custom intracontext mapping.
products:
  - Revenue Cloud
release: "264"
---
# Capture Preferred Transaction Details by Using Custom Fields

To meet specific business requirements, populate custom field data from orders or external transactions to corresponding billing schedule, billing schedule group, and billing schedule group relationship records. Use Context Service to define how data must be transferred by configuring a custom intracontext mapping. Then, use the Create Billing Schedules for Orders API or the Create Standalone Billing Schedules API to generate billing schedules and billing schedule groups. You can also use custom fields to override the standard fields in billing nodes by using the custom intracontext mapping.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with <a href="https://help.salesforce.com/s/articleView?id=ind.revenue_licenses_areas_and_features.htm&amp;release=264.0.0&amp;type=5">the Revenue Cloud Advanced license or the Revenue Cloud Billing license</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d132521e72">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d132521e72 ">To select default records:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d132521e72 ">Billing Admin permission set</td>

          </tr>
        </tbody>
      </table>

For example, you can create and map a custom field Purchase Order Number on an order object to a field named Purchase Order Number on the corresponding billing schedule object. Similarly, you can define and map a custom field Purchase Order Date on an order item to a Purchase Order Date field on the corresponding billing schedule group object.

1. [Create the required custom fields](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm&type=5&language=en_US) on the billing schedule, billing schedule group, and billing schedule group relationship objects.
2. In Context Service, [add the corresponding attributes and tag names to the extended context definitions.](https://help.salesforce.com/s/articleView?id=ind.context_service_create_context_definitions.htm&language=en_US)
    - Pass any preferred transaction data from orders to billing schedules by using the extended BillingContext context definition.
    - Pass transaction data from external transactions to billing schedules by using the StandaloneBillingContext context definition.
3. [Map the corresponding attributes to the custom fields](https://help.salesforce.com/s/articleView?id=ind.context_service_add_context_mapping.htm&type=5&language=en_US) on the billing transaction nodes.
    - To capture preferred details from orders, edit the OrderEntities context mapping to map custom fields from the billing transaction context node attributes to the order fields.
    - To capture preferred details from any external transactions, edit the TransactionMapping context mapping to map the Transaction node attributes with external transaction fields.
4. Edit the BSGEntities context mapping to map the billing schedule context nodes to the fields of the billing schedule, billing schedule group, and billing schedule group relationship objects.
5. [Add a custom intracontext mapping](https://help.salesforce.com/s/articleView?id=ind.context_service_add_context_mapping.htm&type=5&language=en_US) with the mapping intent set to Association. Add mappings from the billing schedule group, billing schedule, and billing schedule group relationship nodes to the corresponding billing transaction nodes.
    
    - BillingScheduleGroup node to the BillingTransaction node
    - BillingSchedule node to the BillingTransactionItem node
    - BillingScheduleGroupRelationship node to the BillingTransactionItemRelationship node
6. [Activate the extended context definition](https://help.salesforce.com/s/articleView?id=ind.context_service_activate_context_definition.htm&type=5&language=en_US).
7. Specify the custom intracontext mapping.
    - Before generate billing schedules from orders, select the custom intracontext mapping on the Billing Settings page in Setup.
    - Before you generate billing schedules from other internal or external transactions, specify the custom intracontext mapping name as the intraContext​CustomMapping​Name property value in the [request body of the Create Standalone Billing Schedules API](https://developer.salesforce.com/docs/atlas.en-us.revenue_lifecycle_management_dev_guide.meta/revenue_lifecycle_management_dev_guide/connect_requests_context_aware_standalone_billing_schedule_metadata_input.htm).
8. Generate billing schedules.
    
    - Use the [Create Billing Schedules for Orders API](https://developer.salesforce.com/docs/atlas.en-us.revenue_lifecycle_management_dev_guide.meta/revenue_lifecycle_management_dev_guide/connect_resources_create_billing_schedules.htm) for generating billing schedules from orders.
    - Use the [Create Standalone Billing Schedules API](https://developer.salesforce.com/docs/atlas.en-us.revenue_lifecycle_management_dev_guide.meta/revenue_lifecycle_management_dev_guide/connect_resources_create_billing_schedules_from_any_transaction.htm) for generating billing schedules from internal or external transactions, or CSV files.
    
    The values in the custom fields are populated automatically.

#### See Also

- [Turn On Context Service](https://help.salesforce.com/s/articleView?id=ind.context_service_turn_on_context_service.htm&language=en_US)
- [Select Context Definition and Mapping for Create Billing Schedules for Orders API](https://help.salesforce.com/s/articleView?id=ind.billing_set_up_context_definition.htm&release=264.0.0&type=5 "The Create Billing Schedules for Orders API uses Context Service to hydrate the data of orders to create billing schedules. Before using this API, select a context definition and its mapping that you want the API to use.")
- [_Revenue Cloud Developer Guide_: Create Billing Schedules for Orders API](https://developer.salesforce.com/docs/atlas.en-us.revenue_lifecycle_management_dev_guide.meta/revenue_lifecycle_management_dev_guide/connect_resources_create_billing_schedules.htm)
- [_Revenue Cloud Developer Guide_: Create Standalone Billing Schedules API](https://developer.salesforce.com/docs/atlas.en-us.revenue_lifecycle_management_dev_guide.meta/revenue_lifecycle_management_dev_guide/connect_resources_create_billing_schedules_from_any_transaction.htm)