Introduction
In this tutorial, we will learn how to import XML using the Agent File Adapter work for consumer. Agent File Adapter for consumer means Inbound Agent File Adapter. To use an agent file for consumer, we need to configure the Agent Control Board, and we need to create an Agent File adapter.
Pre-required
- Create Integration
- Do configuration on the new Agent Control Board
- Create Agent File Adapter(inbound) on the new Agent Control Board
- Create Metadata Provider, Repository, and Message Type
- Create Inbound Interface
- Check Cache monitoring status
How to import XML using Agent File Adapter in the protocol: FTP?
Step-1: Create Integration and test connection destination
Create new Integration by following the guide, link is given below:
https://docs.skyvva-dev.com/docs/tutorial-v2-41-lightning/what-is-an-integration-and-how-to-create-it/
- Navigate to AGENT Control Board as shown below.
- In the Configuration tab enter the connection destination name and click on the button “Continue”
- Fill in all the required details
- Click the button Ping Agent Connection
- Fill in all the required details
- Click the button Ping Salesforce Connection
Step-2: Create an Inbound Agent File Adapter on the new Agent Control Board
- Navigate to the Adapter tab after that click the button New
- Name: any Name
- Type: Agent File
- Direction: Inbound
- Protocol: (your FTP)
- Host: (your Public IP Address)
- Username: (your FTP Username)
- Password: (your FTP password)
- Port:( your FTP Server Port)
- File Type: XML
- Folder: (your folder location FTP)
- File Name: (your File Name)
- What to do with the file after Processing? Delete File
- Connection Destination: (your destination name)
Step-3: Generate Message Type from file
- Create Metadata Provider
- Create Repository
- Go to the Repository details page then click the Open Editor button
- Input a XML format
- After that, we got the Message Type generated as a template from the file
Step 4: Create Interface
- For creating the interface need to follow this guide
https://docs.skyvva-dev.com/docs/tutorial-v2-41-lightning/what-is-an-interface-and-how-to-create-it/
- Create an Inbound Interface for Synchronous mode, Operation(upsert), Choose Adapter, Metadata Provider, Repository, and Message Type
- Mapping
- Upload XML file on consumer folder. Example: MyAccount.xml
- Start the Adapter route by clicking the start route button on the Adapter Detail tab on Agent Control Board
You will get a success message when the route starts successfully
- As a result of message monitoring, the record has been sent to Salesforce correctly