TMFTMForumTransformCreateQuoteRequest

Data Mapper which is responsible for transforming the POST request from TMForum data model to Vlocity Data Model for Quote Management.

Input JSON 

1{
2    "relatedParty": [
3      {
4        "role": "Account",
5        "id": "CD1234"
6      },
7      {
8        "role": "Contact",
9        "id": "003Do00000HcsGKIAZ"
10      }
11    ],
12    "quoteItem": [
13      {
14        "quantity": "1",
15        "productOffering": [
16          {
17            "name": "TMF648 Prod2",
18            "id": "02c29616-bcd5-50bd-afbb-6192ff7f2d7b",
19            "@type": "Product2"
20          }
21        ],
22        "action": "add"
23      }
24    ],
25    "description": "TMF648",
26    "contactMedium": [
27      {
28        "mediumType": "Email",
29        "characteristic": {
30          "emailAddress": "abc@salesforce.com",
31          "contactType": "Email"
32        }
33      },
34      {
35        "mediumType": "Phone",
36        "characteristic": {
37          "phoneNumber": "(990) 099-7788",
38          "contactType": "Phone"
39        }
40      },
41      {
42        "mediumType": "Fax",
43        "characteristic": {
44          "faxNumber": "abc",
45          "contactType": "Fax"
46        }
47      }
48    ],
49    "category": "New Customer",
50    "billingAccount": [
51      {
52        "id": "CD1234"
53      }
54    ],
55    "agreement": [
56      {
57        "id": "00000945"
58      }
59    ]
60}

Output JSON 

1{
2  "relatedParty": [
3    {
4      "role": "Account",
5      "id": "CD1234"
6    },
7    {
8      "role": "Contact",
9      "id": "003Do00000HcsGKIAZ"
10    }
11  ],
12  "quoteItem": [
13    {
14      "productOffering": [
15        {
16          "Product2Id__r.Name": "TMF648 Prod2",
17          "Product2Id__r.GlobalGroupKey__c": "02c29616-bcd5-50bd-afbb-6192ff7f2d7b"
18        }
19      ],
20      "vlocity_cmt__action__c": "add"
21    }
22  ],
23  "contactMedium": [
24    {
25      "characteristic": {
26        "contactType": "Email",
27        "Email": "abc@salesforce.com"
28      },
29      "mediumType": "Email"
30    },
31    {
32      "characteristic": {
33        "contactType": "Phone",
34        "Phone": "(990) 099-7788"
35      },
36      "mediumType": "Phone"
37    },
38    {
39      "characteristic": {
40        "contactType": "Fax",
41        "Fax": "abc"
42      },
43      "mediumType": "Fax"
44    }
45  ],
46  "billingAccount": [
47    {
48      "id": "CD1234"
49    }
50  ],
51  "agreement": [
52    {
53      "id": "00000945"
54    }
55  ],
56  "Description": "TMF648",
57  "vlocity_cmt__Type__c": "New Customer"
58}