vpls360Csr-FormatProductList

This Omnistudio Data Mapper is used in the agent console to format or transform the product list in the change base pack flow.

Sample Input 

1{
2  "records": [
3    {
4      "vlocity_cmt__RecurringPrice__c": {
5        "label": "Recurring Price",
6        "value": 0
7      },
8      "Id": {
9        "label": "Price Book Entry ID",
10        "value": "01u4W000009znoaQAA"
11      },
12      "IsActive": {
13        "label": "Active",
14        "value": true
15      },
16      "Name": {
17        "label": "Product Name",
18        "value": "Test-Product"
19      },
20      "Product2": {
21        "vlocity_cmt__GlobalGroupKey__c": "dd577312-39be-f39d-c06e-04a47be71d61",
22        "vlocity_cmt__IsConfigurable__c": false,
23        "vlocity_cmt__SellingStartDate__c": "2020-07-19T18:30:00.000+0000",
24        "vlocity_cmt__SpecificationType__c": "Product",
25        "vlocity_cmt__SubType__c": "ADD-ON",
26        "vlocity_cmt__Type__c": "SPORTS",
27        "vlocity_cmt__VersionLabel__c": "V1",
28        "Description": "Watch Cricket World Cup",
29        "Id": "01t4W00000BwmtVQAR",
30        "Name": "Play Cricket World Cup",
31        "RecordTypeId": "0124W000001HALSQA4",
32        "attributes": {
33          "type": "Product2",
34          "url": "/services/data/v50.0/sobjects/Product2/01t4W00000BwmtVQAR"
35        }
36      },
37      "Product2Id": {
38        "label": "Product ID",
39        "value": "01t4W00000BwmtVQAR"
40      },
41      "ProductCode": {
42        "label": "Product Code",
43        "value": "VPL-PlayCricketWorldCup"
44      },
45      "SellingPeriod": "Present",
46      "UnitPrice": {
47        "label": "List Price",
48        "value": "0.00"
49      }
50    }
51  ]
52}
ParameterRequired/Optional
recordsRequired

Sample Output 

1{
2  "Product": [
3    {
4      "UnitPrice": "0.00",
5      "ProductCode": "Test-Product",
6      "Type": "None",
7      "SubType": "None",
8      "Id": "01t4W00000BgMN7QAN",
9      "Name": "Test-Product",
10      "IsActive": true,
11      "PriceBookEntryId": "01u4W000009znoaQAA",
12      "RecurringPrice": 0
13    },
14    {
15      "UnitPrice": "0.00",
16      "ProductCode": "VPL-Play",
17      "Type": "PACKAGE",
18      "SubType": "BASE",
19      "Id": "01t4W00000BwmtLQAR",
20      "Description": "An extensive amount of the most popular channels that people love.",
21      "Name": "Play",
22      "IsActive": true,
23      "PriceBookEntryId": "01u4W00000ALFWhQAP",
24      "RecurringPrice": "$15"
25    }
26  ]
27}

Called By 

  • Workflow: Agent console Change Base Package

    • Omniscript: vpls360csrChangeBasePackage

      • Integration Procedure: VPL360_CsrBasepackretrieve