Data Integration mappings for custom files with custom mappings
B2B Gateway uses custom mappings to handle inbound and outbound custom files based on the flows that you assign to the partner.
When you define an inbound flow you must use a custom mapping to receive partner files. The inbound mapping can write the data either to an interface file on the B2B Gateway document store or to the backend system. If the inbound mapping writes the data to the document store, you can use an additional custom mapping to write the data to the backend system.
For inbound Excel, TXT, and CSV files, instead of creating custom mappings to process the incoming files, you can use Informatica Intelligent Structure Discovery to automatically discover the file structure and create CSV interface files. You can then create custom mappings that process the data to your backend system.
When you define an outbound flow you must use a custom mapping to read the data to send to the partner from the backend system. The mapping writes the data to an interface file on the B2B Gateway document store. You can use an additional, outbound custom mapping to send the data to the partner.
Rules and guidelines for custom file mappings
When you develop custom Data Integration mappings to use in B2B Gateway for custom, non-EDI file exchange, consider these rules and guidelines.
•The mappings can process any type of file. B2B Gateway does not verify the file type when it runs the mapping.
•You can create the mappings after your organization is set up in Data Integration and B2B Gateway connections are available for selection when you create the mapping.
Warning:
When you set up the organization in
B2B Gateway
,
B2B Gateway
creates the connections
B2B EDI Gateway
,
B2B EDI Gateway Endpoint
, and
B2B Gateway Document Store
in the
Informatica Intelligent Cloud Services
organization. Do not rename or edit these connections. Editing a connection or changing a connection name might result in errors at run time.
•You must parameterize connections to a B2B Gateway connection. Do not parameterize any other connections.
Note:
Parameterizing connections other than
B2B Gateway
connections might result in errors at run time.
•When the target of a mapping is GW_ROUTER, the value that you assign to the STATUS_MESSAGE port appears in Error events. For all other event statuses, the gateway does not show the status message in the event. Therefore, assign a value to STATUS_MESSAGE only in case IS_EROOR is true.
Context parameters in custom mappings
You can use input and in-out parameters as context parameters in custom mappings to add information from the gateway to inbound and outbound messages and to filter the data in inbound and outbound messages. For example, add the partner name to inbound messages, or filter outbound messages based on partner number.
Consider the following guidelines when you add the parameters:
•Add a transformation to the mapping. You can add any transformation that accepts Data Integration parameters as input. For example, an Expression transformation or a Filter transformation.
•In outbound flows, add the transformation before the target. In inbound flows, add the transformation after the source.
•Configure ports that add the data. The following table describes the port values that you can configure. Port values are not case sensitive.
Port Value
Data to Add to the Port
PARTNER_NUMBER
Partner number
PARTNER_NAME
Partner name
PARTNER_PROD_INTERCHANGE_ID
Partner production interchange ID
PARTNER_TEST_INTERCHANGE_ID
Partner test interchange ID
EVENT_ID
Event ID
Mapping sources and targets in custom file mappings
The sources and targets in custom mappings depend on the direction of the flow, inbound or outbound. For inbound flows, the target of the mapping depends on the processing method, two-step processing or single-step processing.
Sources and targets in inbound flows
Mapping sources and targets in inbound flows depend on the processing method, two-step processing or single-step processing.
Two-step processing
In two-step processing you use both an inbound mapping and a process-to-backend mapping.
The following table describes the sources and targets of the inbound mapping in two-step processing:
Mapping component
Requirements
Source Connection
B2B EDI Gateway Endpoint
Source Object
get
Target Connection
B2B EDI Gateway
Target Object
CUSTOM_TARGET
The following table describes the sources and targets of the process-to-backend mapping in two-step processing:
Mapping component
Requirements
Source Connection
You can add multiple source connections to the mapping. You can use the following connections in the mapping:
- B2B EDI Gateway. You must parameterize the connection.
- Optional connections to other connectors. You can use any Informatica connection that isn't a B2B Gateway connection. Do not parameterize the connections.
Note:
Connecting additional sources to a
B2B Gateway
connection or parameterizing them might result in errors at run time.
Source Object
CUSTOM_SOURCE
Target Connection
Any
Target Object
Any
Single-step processing
In single-step processing you use an inbound mapping. The following table describes the sources and targets of the inbound mapping in single-step processing:
Mapping component
Requirements
Source Connection
B2B EDI Gateway Endpoint
Source Object
get
Target Connection
Any
Target Object
Any
Sources and targets in outbound flows
Mapping sources and targets in outbound flows depend on the stage of the process that the mapping performs, process the data from the backend to B2B Gateway or process the data from B2B Gateway to the partner.
The following table describes the sources and targets of the process-from-backend mapping:
Mapping component
Requirements
Source Connection
Any
Source Object
Any
Target Connection
B2B EDI Gateway
Target Object
CUSTOM_TARGET
The following table describes the sources and targets of the outbound mapping: