TMFTMForumTransformCreateQuoteRequest

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

Input JSON

{
    "relatedParty": [
      {
        "role": "Account",
        "id": "CD1234"
      },
      {
        "role": "Contact",
        "id": "003Do00000HcsGKIAZ"
      }
    ],
    "quoteItem": [
      {
        "quantity": "1",
        "productOffering": [
          {
            "name": "TMF648 Prod2",
            "id": "02c29616-bcd5-50bd-afbb-6192ff7f2d7b",
            "@type": "Product2"
          }
        ],
        "action": "add"
      }
    ],
    "description": "TMF648",
    "contactMedium": [
      {
        "mediumType": "Email",
        "characteristic": {
          "emailAddress": "abc@salesforce.com",
          "contactType": "Email"
        }
      },
      {
        "mediumType": "Phone",
        "characteristic": {
          "phoneNumber": "(990) 099-7788",
          "contactType": "Phone"
        }
      },
      {
        "mediumType": "Fax",
        "characteristic": {
          "faxNumber": "abc",
          "contactType": "Fax"
        }
      }
    ],
    "category": "New Customer",
    "billingAccount": [
      {
        "id": "CD1234"
      }
    ],
    "agreement": [
      {
        "id": "00000945"
      }
    ]
}

Output JSON

{
  "relatedParty": [
    {
      "role": "Account",
      "id": "CD1234"
    },
    {
      "role": "Contact",
      "id": "003Do00000HcsGKIAZ"
    }
  ],
  "quoteItem": [
    {
      "productOffering": [
        {
          "Product2Id__r.Name": "TMF648 Prod2",
          "Product2Id__r.GlobalGroupKey__c": "02c29616-bcd5-50bd-afbb-6192ff7f2d7b"
        }
      ],
      "vlocity_cmt__action__c": "add"
    }
  ],
  "contactMedium": [
    {
      "characteristic": {
        "contactType": "Email",
        "Email": "abc@salesforce.com"
      },
      "mediumType": "Email"
    },
    {
      "characteristic": {
        "contactType": "Phone",
        "Phone": "(990) 099-7788"
      },
      "mediumType": "Phone"
    },
    {
      "characteristic": {
        "contactType": "Fax",
        "Fax": "abc"
      },
      "mediumType": "Fax"
    }
  ],
  "billingAccount": [
    {
      "id": "CD1234"
    }
  ],
  "agreement": [
    {
      "id": "00000945"
    }
  ],
  "Description": "TMF648",
  "vlocity_cmt__Type__c": "New Customer"
}