Mapping of Zuora Invoice to Salesforce CPQ Items.

<!-- Please complete the template below as best as you can. Make sure to check if this issue has already been raised by someone else first to avoid duplication. 

For each section below, please add screenshots or links or anything that may help visual learners understand the problem better, even if this takes you an extra minute or two this is a great help to some folks.

https://www.learning-styles-online.com/style/visual-spatial/

-->

### Problem
After learning that our Web direct code is based entirely off the generated invoice of a Zuora transaction we need to convert the Zuora Invoice Id to its related Invoice Items and then to the correct Amendment, Rate Plan and Rate Plan Charges. The data sent differes for the different transaction types.

### Proposal

Here is how we will map invoice items to the data to be created:

#### New Orders

| Invoice Item    | Amendment to Create | Rate Plan To Create                                 | Rate Plan Charge To Create              |
|-----------------|---------------------|-----------------------------------------------------|-----------------------------------------|
| Positive Charge | NewProduct          | Invoice Item's Related Rate Plan Charge's Rate Plan | Invoice Item's related Rate Plan Charge |

#### Additional Seats

| Invoice Item    | Amendement to Create | Rate Plan To Create                                 | Rate Plan Charge To Create              |
|-----------------|----------------------|-----------------------------------------------------|-----------------------------------------|
| Positive Charge | UpdateProduct        | Invoice Item's Related Rate Plan Charge's Rate Plan | Invoice Item's related Rate Plan Charge |

#### Product Upgrade

| Invoice Item                  | Amendement to Create | Rate Plan To Create                                 | Rate Plan Charge To Create              |
|-------------------------------|----------------------|-----------------------------------------------------|-----------------------------------------|
| Positive Charge (New Product) | NewProduct           | Invoice Item's Related Rate Plan Charge's Rate Plan | Invoice Item's related Rate Plan Charge |
| Negative Charge (Old Product) | RemoveProduct        | Invoice Item's Related Rate Plan Charge's Rate Plan | **No Charge, but the Zuora Id of the Rate Plan that is being removed must be entered into the Quote Rate Plan Charge's zqu__SubscriptionRatePlanZuoraId__c field**                                    |

#### Renewal

| Invoice Item                       | Amendement to Create | Rate Plan To Create                                 | Rate Plan Charge To Create              |
|------------------------------------|----------------------|-----------------------------------------------------|-----------------------------------------|
| Positive Charge (Renewal)          | RenewProduct         | Invoice Item's Related Rate Plan Charge's Rate Plan | Invoice Item's related Rate Plan Charge |
| Positive Charge (Additional Seats) | UpdateProduct        | Invoice Item's Related Rate Plan Charge's Rate Plan | Invoice Item's related Rate Plan Charge |
| Postive Charge (True Up)           | NewProduct           | Invoice Item's Related Rate Plan Charge's Rate Plan | Invoice Item's related Rate Plan Charge |

For all of the Rate Plan and Rate Plan Charge data we will create a 1:1 mapping of the Zuora Fields to the Zuora CPQ fields in Salesforce. @jpetr I will ask you to just make a simple table to map: 

#### Amendment

SFDC: https://gitlab.my.salesforce.com/01I61000001QLnk?setupid=CustomObjects

Zuora: https://knowledgecenter.zuora.com/Billing/Subscriptions/Subscriptions/E_Changing_Subscriptions_Amendments

#### Quote Rate Plan

SFDC: https://gitlab.my.salesforce.com/01I61000001QLnr?setupid=CustomObjects

Zuora:https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/RatePlan

#### Quote Rate Plan Charge

SFDC: https://gitlab.my.salesforce.com/01I61000001QLnq?setupid=CustomObjects

Zuora: https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/RatePlanCharge

Story points: 2.0