You are here:
Submit Order Request for Order Management Integration Layer
If the order management system requires more details than those available in the order, Order Management Integration Layer provides a way to query for details such as the order header record and order product records.
Sample Submit Order Request
{
"orders": [
{
"supplementalAction": null,
"supersededOrderId": null,
"orderStatus": "Ready To Submit",
"orderReferenceNumber": null,
"orderPricings": [
{
"subAction": null,
"source": "Promotion",
"sequence": 2001,
"requestDate": null,
"pricingVariable": {
"code": "OT_STD_PRC_ADJ_PCT"
},
"pricingElement": {
"globalKey": "1eacf022-0648-1dd3-272e-986a120c58ea"
},
"orderItemId": "8024R000000p73zQAA",
"orderAppliedPromotionId": "a364R000001lEPIQA2",
"name": "a3D4R000000rNUh",
"fulfilmentStatus": null,
"fields": null,
"estimatedStartDate": null,
"estimatedEndDate": null,
"appliesTo": null,
"amount": null,
"adjustmentValue": -20.00,
"action": "Add"
},
{
"subAction": null,
"source": "Promotion",
"sequence": 2001,
"requestDate": null,
"pricingVariable": {
"code": "REC_MNTH_STD_PRC_ADJ_PCT"
},
"pricingElement": {
"globalKey": "fbef14ff-6f91-bfc8-6eb7-eac71b0af37b"
},
"orderItemId": "8024R000000p73zQAA",
"orderAppliedPromotionId": "a364R000001lEPIQA2",
"name": "a3D4R000000rNUi",
"fulfilmentStatus": null,
"fields": null,
"estimatedStartDate": null,
"estimatedEndDate": null,
"appliesTo": null,
"amount": null,
"adjustmentValue": -20.00,
"action": "Add"
},
{
"subAction": null,
"source": "Discount",
"sequence": 4001,
"requestDate": null,
"pricingVariable": {
"code": "REC_MNTH_STD_PRC_ADJ_PCT"
},
"pricingElement": null,
"orderItemId": "8024R000000p73uQAA",
"orderAppliedPromotionId": "a364R000001lEPNQA2",
"name": "edbcc744-67c4-d775-842e-60e384aa4eb1",
"fulfilmentStatus": null,
"fields": null,
"estimatedStartDate": null,
"estimatedEndDate": null,
"appliesTo": null,
"amount": null,
"adjustmentValue": -10.00,
"action": "Add"
},
{
"subAction": null,
"source": "Discount",
"sequence": 4001,
"requestDate": null,
"pricingVariable": {
"code": "OT_STD_PRC_ADJ_PCT"
},
"pricingElement": null,
"orderItemId": "8024R000000p73uQAA",
"orderAppliedPromotionId": "a364R000001lEPNQA2",
"name": "edbcc744-67c4-d775-842e-60e384aa4eb1",
"fulfilmentStatus": null,
"fields": null,
"estimatedStartDate": null,
"estimatedEndDate": null,
"appliesTo": null,
"amount": null,
"adjustmentValue": -10.00,
"action": "Add"
},
{
"subAction": null,
"source": "Agent",
"sequence": 3001,
"requestDate": null,
"pricingVariable": {
"code": "REC_MNTH_STD_PRC_ADJ_ABS"
},
"pricingElement": null,
"orderItemId": "8024R000000p73vQAA",
"orderAppliedPromotionId": null,
"name": "a3D4R000000rNUr",
"fulfilmentStatus": null,
"fields": null,
"estimatedStartDate": null,
"estimatedEndDate": null,
"appliesTo": null,
"amount": null,
"adjustmentValue": -2.00,
"action": "Add"
}
],
"orderItems": [
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": "Reassign",
"specifiedBy": {
"productName": "OdinTel Broadband Connection",
"globalKey": "d2f3674e-4fa3-ebb3-a2e3-fe23f596ac44"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73qQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0001.0001",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "9da4740e-2cd8-321b-e03f-79845954ed5b",
"action": "Disconnect"
},
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": "Reassign",
"specifiedBy": {
"productName": "OdinTel provided NetGear Wifi Router",
"globalKey": "7352c8a7-24c5-6a1c-c3ed-806cffa59367"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73rQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0001.0002",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "4381eba6-e5f5-55a9-3d56-36ce3eded59f",
"action": "Disconnect"
},
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": "Replace",
"specifiedBy": {
"productName": "OdinTel Student Internet Offer",
"globalKey": "447e4627-925d-5279-6973-1532a8a01cc4"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73pQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0001",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "41b97b5c-2382-1a45-563c-409e08b4402a",
"action": "Disconnect"
},
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": "Replace",
"specifiedBy": {
"productName": "OdinTel Internet Offer",
"globalKey": "afb2cc8b-d89b-50d3-6c5d-b08924f0aee0"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73uQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0002",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "ba32e205-ed5c-3a81-7262-b5e865fa9475",
"action": "Add"
},
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": "Reassign",
"specifiedBy": {
"productName": "OdinTel Broadband Connection",
"globalKey": "d2f3674e-4fa3-ebb3-a2e3-fe23f596ac44"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73vQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0002.0001",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "0d31567b-68eb-e244-52b0-e5fbd87cf086",
"action": "Add"
},
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": "Reassign",
"specifiedBy": {
"productName": "OdinTel provided NetGear Wifi Router",
"globalKey": "7352c8a7-24c5-6a1c-c3ed-806cffa59367"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73wQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0002.0002",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "a15fa8bd-9793-9c03-ff09-0f7544498247",
"action": "Add"
},
{
"supplementalAction": null,
"supersededOrderItemId": null,
"subAction": null,
"specifiedBy": {
"productName": "OdinTel 4g Data",
"globalKey": "5de352ac-8764-2666-7cb9-bdf234421b6a"
},
"serviceAccountName": "OdinCustomer",
"serviceAccountId": "0014R00002gbHwTQAU",
"quantity": 1.00,
"previousSupplementalAction": null,
"orderItemId": "8024R000000p73zQAA",
"orderId": "8014R000000AQGrQAO",
"lineNumber": "0003",
"isFreshCancellation": false,
"fulfilmentStatus": null,
"firstVersionOrderItemId": null,
"fields": {
"Order.Account.Name": "OdinCustomer"
},
"describedBy": null,
"billingAccountName": "OdinCustomer",
"billingAccountId": "0014R00002gbHwTQAU",
"assetReferenceId": "674e2819-89f3-218a-215c-604b823142c7",
"action": "Add"
}
],
"orderItemRelationships": [
{
"relationshipType": "Replacement",
"relatedOrderItemId": "8024R000000p73pQAA",
"relatedAssetReferenceId": null,
"productRelationshipIdentifier": null,
"orderItemId": "8024R000000p73uQAA",
"orderId": "8014R000000AQGrQAO",
"action": null
},
{
"relationshipType": "Reassignment",
"relatedOrderItemId": "8024R000000p73qQAA",
"relatedAssetReferenceId": null,
"productRelationshipIdentifier": null,
"orderItemId": "8024R000000p73vQAA",
"orderId": "8014R000000AQGrQAO",
"action": null
},
{
"relationshipType": "Reassignment",
"relatedOrderItemId": "8024R000000p73rQAA",
"relatedAssetReferenceId": null,
"productRelationshipIdentifier": null,
"orderItemId": "8024R000000p73wQAA",
"orderId": "8014R000000AQGrQAO",
"action": null
}
],
"orderId": "8014R000000AQGrQAO",
"orderAppliedPromotions": [
{
"subAction": null,
"sequence": null,
"requestDate": null,
"reasonForCancellation": null,
"promotionDefinition": {
"globalKey": "b657f2d7-0c35-6ea5-730c-6cce9ed2b809"
},
"pricingStartDate": null,
"pricingEndDate": null,
"name": "a364R000001lEPI",
"fulfilmentStatus": null,
"fields": null,
"discount": {
},
"commitmentStartDate": null,
"commitmentEndDate": null,
"appliesTo": null,
"action": "Add"
},
{
"subAction": null,
"sequence": null,
"requestDate": null,
"reasonForCancellation": null,
"promotionDefinition": null,
"pricingStartDate": null,
"pricingEndDate": null,
"name": "edbcc744-67c4-d775-842e-60e384aa4eb1",
"fulfilmentStatus": null,
"fields": null,
"discount": {
"id": "a394R000000rcVlQAI",
"source": "OrderDiscount__c",
"referenceNumber": "edbcc744-67c4-d775-842e-60e384aa4eb1"
},
"commitmentStartDate": null,
"commitmentEndDate": null,
"appliesTo": null,
"action": "Add"
}
],
"isActiveOrderVersion": false,
"fulfilmentStatus": null,
"firstVersionOrderId": null,
"fields": {
"Account.Name": "OdinCustomer"
},
"accountName": "OdinCustomer",
"accountId": "0014R00002gbHwTQAU"
}
]
}Sample Order Request
String methodName = 'queryOrders';
Id orderId = '8014R000000AQGrQAO';
Map<String, List<String>> additionalFieldsList = new Map <String, List<String>> {
'Order' => new List<String> {
'Account.Name'
},
'OrderItem' => new List<String> {
'Order.Account.Name'
}
};
Map<String, Object> inputs = new Map<String, Object> {
'orderIdList' => new List<Id> {
orderId
},
'sObjTypeToAdditionalFieldsMap' => additionalFieldsList
};
Map<String, Object> output = new Map<String, Object> ();
Map<String, Object> options = new Map<String, Object> ();
vlocity_cmt.OdinAppHandler handler = new vlocity_cmt.OdinAppHandler();
handler.invokeMethod(methodName, inputs, output, options);
vlocity_cmt.VlocitySubmitOrderRequest orderRequest = (vlocity_cmt.VlocitySubmitOrderRequest) output.get('orderRequest');
System.debug(orderRequest.serialize());Order Request Fields
Field values that include Salesforce IDs are truncated if they are 15 characters.
Field Name |
Name in Interface |
Datatype |
Values |
|---|---|---|---|
Account.Name |
accountName |
String |
String |
AccountId |
accountId |
ID |
Salesforce ID |
EffectiveDate |
effectiveDate |
Date |
|
Name |
name |
String |
The name of the object |
Pricebook2Id |
pricebookId |
ID |
Salesforce ID |
RecordType.Name |
recordTypeName |
String |
Names of Order's Record Types |
RecordTypeId |
recordTypeId |
ID |
Salesforce ID |
Salesforce fields required for the order management system's order processing. You can implement a hook for such fields. |
fields Example: fields.key1: value1 fields.key2: value2 |
The datatype depends on the field being queried. |
These fields are defined in Salesforce. |
vlocity_cmt__DefaultServiceAccountId__c |
serviceAccountId |
ID |
Salesforce ID |
vlocity_cmt__FirstVersionOrderIdentifier__c |
firstVersionOrderId |
String |
The value of the FirstVersionOrderIdentifier__c field If the value is null or equal to the ID field, it is an original order. For CME Winter '20 and later releases, the Supplemental Action field will have a value of null for If it is a supplemental order, it will have the ID of the original order. In this case, the Supplemental Action field will have a value of |
vlocity_cmt__OrderStatus__c |
orderStatus |
String |
|
vlocity_cmt__SupersededOrderId__c |
supersededOrderId |
ID |
Salesforce ID Trimmed to 15 characters |
Field Name in Salesforce |
Name on Interface |
DataType |
Values |
|---|---|---|---|
Decimal |
decimal |
Decimal |
|
UnitPrice |
unitPrice |
Double |
|
vlocity_cmt__Action__c |
action |
String |
|
vlocity_cmt__AssetReferenceId__c |
billingAccountName |
assetReferenceId |
|
vlocity_cmt__BillingAccountId__c |
billingAccountId |
ID |
|
vlocity_cmt__BillingAccountId__r.Name |
billingAccountName |
ID |
|
vlocity_cmt__LineNumber__c |
lineNumber |
String |
|
vlocity_cmt__RootItemId__r.vlocity_cmt__LineNumber__c |
topOILineNumber |
String |
|
vlocity_cmt__ServiceAccountId__c |
serviceAccountId |
ID |
|
vlocity_cmt__ServiceAccountId__r.Name |
serviceAccountName |
String |
|
vlocity_cmt__SubAction__c |
subAction |
String |
These are related to Change of Plan. |
vlocity_cmt__SupplementalAction__c |
supplementalAction |
String |
|
Does not exist in salesforce. This value is computed while the order request is generated. |
isFreshCancellation |
Boolean |
|
Does not exist in the record. This value is retrieved using dot notation from vlocity_cmt__SupersededOrderItemId__r.vlocity_cmt__SupplementalAction__c |
previousSupplementalAction |
String |
|
Field Name in Salesforce |
Name in Interface |
Datatype |
Values |
|---|---|---|---|
Name |
name |
String |
|
vlocity_cmt__AccountId__c |
BillingAccountId |
String (ID) |
Salesforce ID Trimmed to 15 characters |
vlocity_cmt__AccountDiscountId__c |
AccountDiscountid |
String (ID) |
Salesforce ID Trimmed to 15 characters |
vlocity_cmt__Action__c |
Action |
String |
|
vlocity_cmt__AppliesTo__c |
AppliesTo |
String |
|
vlocity_cmt__AssetId__c |
AssetId |
String (ID) |
Salesforce ID Trimmed to 15 characters |
vlocity_cmt__PricingEndDate__c |
BenefitEndDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__PricingStartDate__c |
BenefitStartDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__CommitmentEndDate__c |
CommitmentEndDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__CommitmentStartDate__c |
CommitmentStartDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__ContractId__c |
ContractId |
String (ID) |
Salesforce ID |
vlocity_cmt__ContractDiscountId__c |
ContractDiscountId |
String (ID) |
Salesforce ID |
vlocity_cmt__FulfilmentStatus__c |
FulfilmentStatus |
String |
|
vlocity_cmt__OrderDiscountId__c |
OrderDiscountId |
String (ID) |
Salesforce ID |
vlocity_cmt__PromotionId__c |
PromotionId |
String (ID) |
Salesforce ID |
vlocity_cmt__ReasonForCancellation__c |
ReasonForCancellation |
String |
Free form text field. Any reason |
vlocity_cmt__RequestDate__c |
RequestDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__Sequence__c |
Sequence |
Number (18,0) |
|
vlocity_cmt__SubAction__c |
SubAction |
String |
|
Field Name in Salesforce |
Name in Interface |
Datatype |
Values |
|---|---|---|---|
Name |
ReferenceNumber |
String |
|
vlocity_cmt__Action__c |
Action |
String |
|
vlocity_cmt__AdjustmentValue__c |
AdjustmentValue |
Decimal (or Double) |
|
vlocity_cmt__Amount__c |
Amount |
Decimal (or Double) |
|
vlocity_cmt__OrderAppliedPromotionId__c |
AppliedPromotionId |
String (ID) |
Salesforce ID |
vlocity_cmt__AppliesTo__c |
Applies To |
String |
|
vlocity_cmt__EstimatedEndDate__c |
EstimatedEndDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__EstimatedStartDate__c |
EstimatedStartDate |
DateTime |
yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm or yyyy-MM-ddTHH:mm:ss.SSSZ |
vlocity_cmt__FulfilmentStatus__c |
FulfilmentStatus |
String |
|
vlocity_cmt__OverrideDefinitionId__r.vlocity_cmt__GlobalKey__c |
OverrideDefinitionId |
String(Id) |
Salesforce ID |
vlocity_cmt__PriceListEntryId__r.vlocity_cmt__GlobalKey__c |
PriceListEntryId |
String(Id) |
Salesforce ID |
vlocity_cmt__PricingElementGlobalKey__c |
PricingElementGlobalKey |
String |
Salesforce ID |
vlocity_cmt__PricingElementVersionId__c |
PricingElementVersionId |
String (ID) |
Salesforce ID |
vlocity_cmt__PricingVariableId__r.vlocity_cmt__GlobalKey__c |
PricingVariableId |
String (ID) |
Salesforce ID |
vlocity_cmt__PromotionId__r.vlocity_cmt__GlobalKey__c |
PromotionId |
String (ID) |
Salesforce ID |
vlocity_cmt__RequestDate__c |
RequestDate |
DateTime |
|
vlocity_cmt__Sequence__c |
Sequence |
Integer |
|
vlocity_cmt__Source__c |
Source |
String |
|
vlocity_cmt__SubAction__c |
SubAction |
String |
|
vlocity_cmt__TimePlanId__r.vlocity_cmt__GlobalKey__c |
TimePlanId |
String |
|
vlocity_cmt__TimePolicyId__r.vlocity_cmt__GlobalKey__c |
TimePolicyId |
String |
Field Name in Salesforce |
Name in Interface |
Datatype |
Values |
|---|---|---|---|
Action__c |
action |
String |
|
OrderItemId__c |
sourceOrderItemId |
ID |
Salesforce ID |
ProductRelationshipIdentifier__c |
relationshipIdentifier |
String |
GUID |
RelatedAssetReferenceId__c |
relatedAssetRefId |
String |
GUID |
RelatedOrderItemId__c |
relatedOrderItemId |
ID |
Salesforce ID |
RelationshipType__c |
relationshipType |
String |
|

