Send additional data to Salesforce with Opportunity creation

This is part of the research issue #1252 (closed).

Additional data has to be sent when a Salesforce Opportunity is created/update to create more object. This should happen whenever the service CreateSalesforceOpportunityService is invoked. The additional data will create a Quote, Quote Amendment, Quote Rate Plan and Quote Rate Plan Charge in Salesforce along with the Opportunity. We will need a service for each of those object creations.

The following data as originally described in this comment is needed to create the objects:

Quote (zqu__Quote__c)

Field Name Field API Name Value
Opportunity zqu__Opportunity__c id of the Opportunity
Start Date zqu__StartDate__c today's date
Initial Term zqu__initialTerm__c 12
Renewal Term zqu__renewalTerm__c 12
Bill To Contact zqu__BillToContact__c id of the contact used for the Opportunity or a new one
Sold To Contact zqu__SoldToContact__c id as the Bill To
Currency zqu__Currency__c 'USD'
Name name any string

Quote Amendment (zqu__QuoteAmendment__c)

Field Name Field API Name Value
Quote zqu__Quote__c id of the Quote you created above
Type zqu__Type__c 'NewProduct'

Quote Rate Plan (zqu__QuoteRatePlan__c)

Field Name Field API Name Value
Quote zqu__Quote__c id of the Quote you created above
Quote Amendment zqu__QuoteAmendment__c id of the Quote Amendment you created above
Product Rate Plan zqu__ProductRatePlan__c the id of the Product Rate Plan returned from this query: [SELECT id, zqu__ZuoraId__c FROM zqu__ProductRatePlan__c WHERE zqu__ZuoraId__c = '2c92c0f86716796f01671a8e683821f2' LIMIT 1]
Product Rate Plan Zuora Id zqu__ProductRatePlanZuoraId__c the zqu__ZuoraId__c of the Product Rate Plan returned from the query to find the Product Rate Plan id
Amendment Type zqu__AmendmentType__c 'NewProduct'

Quote Rate Plan Charge (zqu__QuoteRatePlanCharge__c) (Effective Price is optional, but it can determine MRR)

Field Name Field API Name Value
Quote Rate Plan zqu__QuoteRatePlan__c id of the Quote Rate Plan created above
Quote Quote__c id of the Quote created above
Product Rate Plan Charge zqu__ProductRatePlanCharge__c the id of the Product Rate Plan Charge returned from this query: [SELECT id, zqu__ZuoraId__c FROM zqu__ProductRatePlanCharge__c WHERE zqu__ZuoraId__c = '2c92c0f86716796f01671a8e685321f4' LIMIT 1]
Quantity zqu__Quantity__c 1
Product Rate Plan Charge Zuora Id zqu__ProductRatePlanChargeZuoraId__c the zqu__ZuoraId__c of the Product Rate Plan Charge returned in the query for the Product Rate Plan
Currency zqu__Currency__c 'USD'
Effective Price zqu__EffectivePrice__c this is optional, but it's a decimal of size 11,7
Edited by Vladlena Shumilo