Tutorials

  1. Home
  2. Dokumente
  3. Tutorials
  4. 110. Agent File Adapter
  5. 110.1 How to use Agent File Adapter For Consumer

110.1 How to use Agent File Adapter For Consumer

Introduction

In this tutorial, we will learn how Agent File Adapter works for consumer. Agent File Adapter for consumer means Inbound Agent File Adapter. We use Inbound Agent File adapter for reading using the new event-driven mode with the consumer. We have an event-driven listener which is a camel consumer. We don’t need a scheduler. We add the real-time and event-driven feature to pick up immediately. To use the agent file for consumer, we need to configure the Agent Control Board, and we need to create an Agent File adapter.

Pre-required

Firstly, you need to have some required step before you can use the Agent File adapter:

  • Create Metadata Provider, Istructure Repository
  • Create Integration and Configure a new agent control board
  • Create Agent File Adapter(inbound) on new Agent Control Board
  • Create Inbound interface
  • Checking Cache monitoring status

How to use Agent File Adapter for Consumer?

  1. Create Metadata Provider, Istructure Repository and Create Flat Message

 

2. Go to the Integration Detail page

  • Click on the new agent control board

  • Now we need to create a connection destination. For that, we can give any name to the destination. As shown below.

  • Fill all the required fields in Salesforce -> Agent

  • Click on the Ping Agent connection

  • Fill all the required fields in Agent -> Salesforce and click on the Ping Salesforce Connection
  • Save

Case 1: Create Inbound Agent File Adapter for CSV format and Protocol: Local.

  • Go to the new Agent control board and create a new Agent File adapter for CSV data format inbound processing
  • Fill all required field

– Name: any Name

– Type: Agent File

– Direction: Inbound

– Protocol: Local

– File Type: CSV

– Folder: C: File_Adapter

– File Name: Account.csv

– What to do with the file after Processing?: Delete File

– Connection Destination: your destination name

 

 

  • Create Integration and Inbound Interface
  • Add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below.

  • Add Inbound Adapter

  • Mapping

  • Upload CSV file on consumer folder. Example: MyAccount.csv

  • Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board

You will get a success message when the route starts successfully

Note
you need to link the inbound adapter with the inbound interface otherwise route will not start.
  • You will get a success message when the record is inserted if the record does not exist in Salesforce org. When a record is modified if the record already exists in your Salesforce org.

 

Case 2: Create Inbound Agent File Adapter for Excel format and Protocol: FTPs

  • Create Inbound Agent File Adapter for excel format
  • Fill all required field

– Name: any Name

– Type: Agent File

– Direction: Inbound

– Protocol: FTPs

– Host: Public IP Address

– Username: FTPs Username

-Password: FTPs password

-Port: FTPs Server Port

-File Type: Excel

-Folder: Sreymay/Inbound2/Excel

-File Name: MyAccount2.xlsx

– What to do with the file after Processing?: Delete File

– Connection Destination: your destination name

  • Create an inbound interface, add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below.

  • Add inbound Adapter

  • Mapping

  • Upload Excel file on consumer folder. Example: MyAccount2.xslx

  • Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board

You will get a success message when the route started successfully.

  • Here is the result of Excel in Message monitor

Case 3: Create Inbound Agent File Adapter for XML format and Protocol: SFTP

  • Create Inbound Agent File Adapter for XML format
  • Fill all required field

– Name: any Name

– Type: Agent File

– Direction: Inbound

– Protocol: SFTP

– Host: Public IP Address

– Username: SFTP Username

-Password: SFTP password

-Port: SFTP Server Port

-File Type: XML

-Folder: SFTP/XML

-File Name:Account-SB3.xml

– What to do with the file after Processing?: Delete File

– Connection Destination: your destination name

  • Create an inbound interface, add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below

  • Add inbound adapter

  • Mapping

  • Upload XML file on consumer folder. Example: Account-SB3.xml

  • Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board

You will get a success message when the route started successfully.

  • Here is the result of XML in the Message monitor

Case 4: Create Inbound Agent File Adapter for JSON format and Protocol: FTP

  • Create Inbound Agent File Adapter for JSON format
  • Fill all required field

– Name: any Name

– Type: Agent File

– Direction: Inbound

– Protocol: FTP

– Host: Public IP Address

– Username: FTP Username

-Password: FTP password

-Port: FTP Server Port

-File Type: Json

-Folder: Sreymay/Inbound/Json

-File Name:Final_json5.json

– What to do with the file after Processing?: Delete File

– Connection Destination: your destination name

  • Create an inbound interface, add Metadata Provider, Istructure Repository, and Message type to the interface page as shown below

  • Add inbound adapter

  • Mapping

  • Upload JSON file on consumer folder. Example: Final_json5.json

  • Start the adapter route by clicking the start route button on Adapter Detail Tab on Agent Control Board

You will get a success message when the route started successfully.

  • Here is the result of XML in the Message monitor

Summary:

We have learned how to use an inbound Agent File adapter for reading using the new event-driven mode with the consumer. In this adapter, we can do inbound with CSV, Excel, XML, and Json data records.

Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?