Order Backfill Process Service

Knowledge Center > Zuora CPQ > Zuora Connector for Salesforce CPQ > Classes in Zuora Connector for Salesforce CPQ > OrderBackfillProcessor Class > Order Backfill Process Service

Order Backfill Process Service

This functionality is only available if you have the Orders feature enabled.

When you submit Salesforce Contract to Zuora, the Zuora Connector for Salesforce CPQ will call Zuora asynchronous REST API to create subscriptions in Zuora. Upon completion, only the subscription Ids are returned. You can then use OrderBackfillProcessor class to populate other subscription-related information. 

New Custom Fields

Before you can use the Order backfill process service, you must add new custom fields to Salesforce Contract, SBQQ__Subscription__c, and Zuora Order Action. The following table lists all the required new custom fields.

Object Custom Field Label  API Name
Salesforce Contract Cancellation Order Number CancellationOrderNumber__c
Salesforce SBQQ__Subscription__c Zuora Order Number OrderNumber__c
Zuora Order Id OrderId__c
Zuora Order Action Id OrderActionId__c
Zuora Order Action Type OrderActionType__c
Zuora Charge Number ChargeNumber__c
Zuora Order Action SBQQ Subscription Number sfdcSubscriptionNumber__c
SBQQ Subscription Id sfdcSubscriptionId__c
Description sfdcDescription__c

Validation

When you click Send Order on the Contract Detail page,  an Order Summary will be generated. When deserializing the SubmitContractOrder.Result, the backfill processor will make the validation below before an Order Summary object is successfully created:

return orderAction.type != null 
 && orderAction.customFields != null
 && orderAction.customFields.get('sfdcSubscriptionNumber__c') != null
 && orderAction.customFields.get('sfdcSubscriptionId__c') != null
 && orderAction.customFields.get('sfdcDescription__c') != null;

Although an Order Summary only consists of the OrderAction type and OrderAction description, it will not be created unless all the required fields of the OrderAction are populated. Missing value of any required field will cause the backfill operation to fail. 

Backfill Field Mappings

See the following table for the backfill field mappings.

Salesforce CPQ Object

Salesforce Field

Zuora Field

Zuora Object

Notes

SBQQ__Subscription__c

OrderNumber__c

OrderNumber

Order

 

SBQQ__Subscription__c

OrderId__c

Id

Order

 

SBQQ__Subscription__c

OrderActionId__c

Id

OrderAction

 

SBQQ__Subscription__c

OrderActionType__c

-

-

Derived programmatically and stored in salesforce.

Possible values are : AddProduct, UpdateProduct, RemoveProduct, and RenewSubscription.

SBQQ__Subscription__c

ChargeNumber__c

ChargeNumber

RatePlanCharge

 

SBQQ__Subscription__c

RatePlanId__c

RatePlanId

RatePlanCharge

 

SBQQ__Subscription__c

RatePlanChargeId__c

Id

RatePlanCharge

 

Limits

The backfill process has the following the limits:

  • As the Orders REST API only supports querying an Order by the OrderNumber, the Order Backfill process service could not handle the case where the OrderNumber is not back populated due to timeout or any other unexpected reason after the creation of the subscription.
  • As the Orders REST API does not support querying Orders by a list of OrderNumbers, the Orders have to be queried one by one. There might be a performance issue if the volume is high in a specific transaction. In that case, the mitigation is to skip the backfill process if the Contract has been backfilled previously.
  • Multi-Entity is not supported.
  • ZSBConnectorUtils.makeAmendmentSummaries() does not return correct amendment details for subscriptions with UpdateProduct actions when the Orders feature is enabled for your tenant. 
Last modified

Tags

This page has no custom tags.

Classifications

(not set)