# File Exchange Onboarding Process
source: https://developer.mastercard.com/carbon-calculator/documentation/tutorials-and-guides/file-exchange-onboarding-tutorial/index.md

#### Introduction {#introduction}

* File exchange happens with the help of the Next Generation File Transfer (NGFT) portal.
* Next Generation File Transfer (NGFT) is an application suite that manages file transfers for the Mastercard Enterprise. File exchange is the process of exchanging one or more files over a computer network using a predetermined protocol (formal set of rules, conventions, and data structures). NGFT includes file transfer between -
  * Mastercard applications
  * Mastercard applications and external entities. For example, franchise customers, business partners, and vendors (customers)
* The Mastercard File Transfer Service is the name given to the Mastercard infrastructure that manages the exchange of files between Mastercard and its business partners (acquirers, issuers, processors, customers, and vendors) or between Mastercard internal applications.
* The Mastercard business partners exchange at least one kind of file with Mastercard and therefore required to complete the file transfer setup process. The information in these files can be of a variety of types such as data files, reports, and response files---any type of information that supports a specific business purpose.
* File exchange from source to destination via "File Transfer Service" involves two individual file transfers -
  * Source to the File Transfer Service: The source (originator) creates and sends a file to NGFT
  * File Transfer Service to Destination: Based on an established configuration, the file transfer service routes the file to its destination or consumer

<br />

#### Prerequisites {#prerequisites}

Note:   

* The customer (Company ID and User) should be onboarded as a Mastercard customer on Mastercard Connect.  
* The customer should be able to order the **File Exchange** application on Mastercard Connect via the store.

#### Sequence Diagram {#sequence-diagram}

The sequence diagram shows the order of events for a solution that the NGFT onboarding process.

Diagram file-exchange-onboarding

#### What you will learn {#what-you-will-learn}

* How to onboard customers to file exchange service
* How to add a logical address
* How to create a file exchange setup

### Onboarding Process for File Exchange {#onboarding-process-for-file-exchange}

### Flow Diagram {#flow-diagram}

The diagram represents the flow of the onboarding process to the file exchange service:
![Customer File Exchange Service Flow](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/onboard_file_transfer_image.png)

### Prerequisites {#prerequisites-1}


Note:   

* The detailed prerequisites for the customers to avail the service are:  
  * The customer (Company ID and User) should be onboarded as a Mastercard customer on Mastercard Connect. The flow to onboarding a company to Mastercard Connect is governed by the GBSC Onboarding team depending on the type of customer.  
  * If the customer is planning to exchange files using HTTP APIs, generate CSR and get **Client DNs** from KMP Portal.  
    For example: CN=apptest-envMTF, OU=test-MTF, O=Mastercard - Test, DC=mastercard, DC=com
  * The customer should be able to order the **File Exchange** application on Mastercard Connect.  
* Refer to the [Mastercard File Exchange User Guide](https://trc-techresource.mastercard.com/r/bundle/m_fxusg_en-us/page/d/en-US/pvd1747164178802.html) available on the [Technical Resource Center](https://trc-techresource.mastercard.com/) via [Mastercard Connect](https://www.mastercardconnect.com/-/sign-in) for low-level details on the process.

<br />

### Step 1 - Product setup {#step-1---product-setup}

Your first step is to create a new product via the File Exchange application, accessible via Mastercard Connect.

1. Login to the **Mastercard File Exchange** application.

2. Select the "**My Products** " tab, and click "**Add New Product**".

   ![Customer-Product List](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/customer_product_list.png)   

   The detailed sections outline how to complete the setup for the Carbon Calculator File based scoring functionality.
   1. The **Details** screen is to add the product name and its details.

      1. Add the product name. When adding a new product, we recommend you set the product name to **Carbon Calculator Batch Scoring**.
      2. Select CarbonCalculator@\< company name \> for "**My product will exchange files using**". This is the logical address that represents the files you send and receive related to the Carbon Calculator product. This is used several times within the setup process.
      3. Click **Next**.

      ![Add Product Details Tab](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/add_product_details.png)

   <br />

   2. The **File Profile** screen is to add or manage file profiles.

      The Carbon Calculator Batch File Scoring functionality requires two file profiles to be set up, as the customer should push transaction files to Mastercard, and Mastercard then provides the response file to the customer.
      * If the profile is for **Customer to Mastercard** then the steps are:
        1. Select **Action** as "**Produces**", as the customer sends a transaction file to be scored by Mastercard.
        2. Select "**carbon_calculator_file_scoring**" as the file profile.
        3. Processor is not applicable for this implementation type.
        4. Click **Attached File Profile**.
        5. Click **Next**.
      * If the profile is for **Mastercard To Customer** then the steps are:
        1. Select **Action** as "**Consumes**", as the customer consumes the scored transaction file sent from Mastercard.
        2. Select "**carbon_calculator_file_scoring**" as the file profile.
        3. Processor is not applicable for this implementation type.
        4. Click **Attached File Profile**.
        5. Click **Next**.

      ![Add Product File Profile Tab](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/add_product_file_profile.png)

   <br />

   3. The **Connections** screen is to add supported protocols for customers to initiate the connection.

      As the customer initiates the connection, the customer should choose one of the options:
      * Customer initiated HTTPS Push/Pull
      * Customer initiated SFTP Push/Pull   

      1. Select "Push" for the entry where the customer pushes files to Mastercard.
      2. Select "Pull" for the entry where Mastercard is providing the files to the customer. This means the customer needs to connect and pull the file once it has been processed.

      ![Add Product Connections Tab](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/add_product_connections.png)


      Note:   
      - Refer to the \[Mastercard File Exchange User Guide\](https://trc-techresource.mastercard.com/r/bundle/m_fxusg_en-us/page/d/en-US/pvd1747164178802.html) for the configuration requirements needed based on your selected connection type. - \*\*Protocols supported by File Exchange Service\*\*   
      - File Exchange Service supports the protocols for customers are:   
      - The customer initiated HTTP PUSH and Pull - via API  
      - Mastercard initiated HTTP upload and download - via Web UI  
      - Mastercard initiated SFTP Push over the Internet   

      <br />

   4. The **Authorization** screen is to add usage projection details.

      * On the given screen, the usage projections like file size, frequency of file exchanges, retention, etc. must be captured. The contact information of the customer should be added in the contact details section. The retention period can be specified in both hours and days.

      ![Add Product Auth Tab](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/add_product_auth.png)

   <br />

   5. The **Review** screen is to preview the added details.

      * Once all the details are entered, review the settings, and click **Complete**.

      ![Add Product Review Tab](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/add_product_review.png)

<br />

### Step 2 - Activating your product {#step-2---activating-your-product}

* Once the product has been set up, you need to **Activate** it before you can use it. To do this, go to the Product page and click the name of the product, for example, "**Carbon Calculator Batch Scoring**".

* In the bottom right corner of the page, click **Action** then select **Activate** . The product can now be selected when completing the **File Exchange Setup** activities.

### File Exchange Setup {#file-exchange-setup}

Now you have set up the entity you wish to submit Carbon Calculator files with, you need to create a File Exchange to link it to the Carbon Calculator system, so that when you submit files, they are picked up for processing.


Within the Mastercard File Exchange application, click on the **File Exchange** tab.

1. Click "**Create New Exchange**".

   ![Create Exchange Part 1](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/create_exc1.png)
   1. The **Details** screen is to add the file exchange details.

      1. Add **File Exchange Setup Name** as **Carbon Calculator Batch Scoring**.
      2. Select your logical address in **I/My Organisation will exchange files using** the dropdown list. This is the logical address you specified when you created the product in step 3, such as CarbonCalculator@company name\>.
      3. Select cc-file-processor@mastercard from the dropdown list.
      4. Click **Next**.

      ![Create Exchange Part 2](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/create_exc2.png)
   2. The **Connections** screen is to add supported protocols for customers to initiate the connection.

      * Select the appropriate connection to complete the file exchange with and click **Next**.

      ![Create Exchange Part 3](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/create_exc3.png)
   3. The **Review** screen is for previewing all the details added.

      * Check the details on the page to ensure they are correct and click **Complete**. A pop-up appears to confirm the exchange.
      * The exchange request needs to be approved by Mastercard before it can become active. Advise your Mastercard Implementation Manager once this has been completed, and they ensure your request is approved promptly.

      ![Create Exchange Part 4](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/create_exc4.png)
2. Once the exchange is set up successfully a pop-up appears indicating the success.

   ![Create Exchange Part 5](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/create_exc5.png)

### Creating MC Developers Project {#creating-mc-developers-project}

Now that the File Exchange has been setup between yourself and Mastercard Carbon Calculator, you need to create a Carbon Calculator Project on Mastercard Developers so that your profile can be setup on the Carbon Calculator platform.

When creating a project, you only need to provide the details:

* **Customer Name**: The name of your organization
* **SenderId**: This is the customer logical name or logical address you provided when you created the product in step 1, such as carboncalculator@company name\>.
* **CardholderBase**: This is the total volume of card holders for whom the cards have been issued.

<br />

This should automatically setup your access in the Sandbox environment allowing you to complete your validation. Work with your Mastercard Implementation Engineer to complete the validation phase; once completed, you can move to production.

### Move to Production {#move-to-production}

When you're ready to move to production, the first activity is to promote your File Exchange Product to production. Ensure all connectivity details for the **File Exchange** product have values for production before initiating the promotion.

<br />

1. To do this, whilst in the File Exchange Application, navigate to the product page and select the applicable product you wish to promote to production. Click on the "**Action** " option in the bottom right of the screen and select "**Promote** ". ![Production Promotion](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/production_promote.png)   
2. Select the target environment as "**Production** " with the appropriate regions "**China** " or "**Global** ". ![Production Region](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/production_region.png)   
3. Once complete, you should be given an ID that you must share with your Mastercard Implementation Manager. This is to be used to complete the technical activities to move your configurations to production. ![Promotion Success](https://static.developer.mastercard.com/content/carbon-calculator/Images/file-exchange-onboarding/promotion_success.png)   
4. The final step is to move your MC Developers project to production. Log in to Mastercard Developers, navigate to your project, and click "Move to production".   
   You need to enter the details:

* **Customer Name**: The name of your organization
* **SenderId**: This is the customer logical name or logical address you provided when you created the product in step 1, such as carboncalculator@company name\>.

<br />

<br />


Once submitted, notify your Mastercard Implementation Manager, who should approve your request. The implementation manager confirms when the activities have been completed, allowing you to submit your first production file.
