The process orchestration takes FlatFile as input and translates it to Amazon Marketplace formatted XML payload of type Order Fulfillment Feed and sends the same to AMP. Once the feed is submitted to AMP, the process orchestration also checks for the Feed Submission results at the AMP side and retrieves the Feed Status.
The Business Process also handles the batching of Feeds & Feed Submission Results provided the XML payload has multiple messages.
The process orchestration logic has been configured to perform the following operations
- Receive the FlatFile and translate it to AMP Order Fulfillment feed formatted XML payload.
- Submit the feed to Amazon with the right APIs.
- Retrieve the Feed Submission results for all the Feeds that are submitted using the right APIs.
- Parse the Feed Submission result payload to retrieve the status of the Feed.
- Generate an email alert if the Feed processing has resulted in an error at AMP.
Configure the Order Fulfillment (Shipment) Flow
Below are the high-level steps to configure the Order Fulfillment (Shipment) Flow:
- Configure the objects used to retrieve shipment payload from ERP. this includes a specialized Ruleset (DARS) and Launcher Business Process.
- Create the Application Route to route the payload to Amazon.
- Create the transformation Ruleset with required mapping to convert ERP Shipment payload to the Amazon Feed XML.
- Configure a Business Process to transform and send the feeds to Amazon.
Setting up ERP Resources (Launch BP, DARS, and Application Interface)
Create a package in the Customer ERP project (see Configure the Customer ERP Project ) to add the objects with reference to the fulfillment flow. Recommended package name: com.cleo._customer_.erpname.
From com.cleo._customer_.booster.sample.ampff, copy the Application Interface (SampleAmpFFAI) and paste into the package created above. Rename it to match the target ERP and file format type eg. “AmpErpnameAI.appInterface”. If more attributes are required, then add them. For more details refer Application-Interface.
Create another package in the Customer ERP project. Recommended package name: com.cleo._customer_.erpname.fulfillment. This will contain objects with reference to the fulfillment flow.
Create the following in this package:
Schema: Create a Schema (format based on ERP). For reference, a sample schema (SampleAmpFFItemFulfillmentFF) can be found in the sample project in the com.cleo._customer_.booster.sample.ampff.fulfillment package.
DARS (Ruleset): Using the schema created above as the source schema, create a DARS. For reference, a sample DARS (SampleFFItemFulfillmentDARS) can be found in the same package noted above.
Launch Business Process: Create a Business Process (no template). For reference, a sample launch BP (LaunchSampleFFItemFulfillmentBPS) can be found in the same package noted above.
This LaunchBP triggers the DARS, which in turn finds the matching App Route using AI.
- The first step would be to retrieve the shipment payload from ERP.
- For file-based integrations, create an endpoint of the required type. For more information on endpoints please refer to Managing-Endpoints.
- Create a dataflow with the source as the endpoint created in the above step, and transformation as the target endpoint. In the sample project, there is a SampleAmpFFEV Event in the com.cleo._customer_.booster.sample.ampff package. This triggers the LaunchSampleFFItemFulfillmentBPS.
- A similar event should be created by the user; the LaunchBPS needs to be called in the event.
For more details refer to Events.
- For other integration types, configure the necessary objects (WS Consumer, Provider, adapters, connector calls) to retrieve the data.
- The next step is to call the DARS you've just created above.
SetReprocessEnvParametersBPS: Copy the SetReprocessEnvParametersBPS (located in com.cleo._customer_.booster.sample.ampff.fulfillment) and paste it in the package created above (com.cleo._customer_.erpname.fulfillment).
Open the MANIFEST.MF file from the META-INF folder and add all new packages created above.
Setting up Resources for AMP ERP Intersection Project
Create a package in the intersection project previously created (as described in Configure AMP and ERP Intersection Project) to add the objects with reference to the fulfillment flow.
Recommended package name: com.cleo._customer_.erpname.
Create the following in this package:
Ruleset: Create a new transformation Ruleset. For source schema, use the one created above (see Setting up ERP Resources). For target, use the com.cleo.cic.connector.amp.xsd.AmazonEnvelopeOBJ.
It is mandatory to map process environment variable envLomId to environment variable Log_of_Message_Id (shown below).
- In the Ruleset, add a rule ProcessEnvironment_GetStringValueAction, and make the source property value as a hardcoded string value envLomId. Set the target as environment variable env.Log_of_Message_Id.
This is required for cockpit tile creation and should ideally be the first rule in the transformation ruleset.
Save your changes.
Note: The SampleFFItemFulfillmentToAmpItemFulfilmentRS Ruleset (located in the com.cleo._customer_.amp.sample.ampff.fulfillment package), has been configured to convert Flat File(CSV) file to Amazon Seller Central ItemFulfillment, as an example. Refer to creating rulesets for more info.
Copy and paste the RouteSampleFFItemFulfilmentBP (located in the sample Intersection Project com.cleo._customer_.amp.sample.ampff) and rename it as RouteERPItemFulfillmentBPS.
Delete the SetReprocessEnvParametersBPS task that shows up as error as it referred to the sample project.
Add a step, SetReprocessEnvParametersBPS (copied in a previous step above). It has been supplied with all the necessary logic to process this payload further. In this Business Process, the payload will be translated to the Amazon-supported format.
Create a new Application Route. Set the Application Matching Parent to the AI that was created in the Setting up Customer ERP section. Parameters are as follows:
DocType = document name, Target = AMP and SourceApp as the ERP (same values should be configured in DARS created previously).
In the sample Route (shown here), DocType has been configured as ItemFulfilment in DARS and Application Route. If new attributes were added in the Application Interface object, then configure the values accordingly.
The Route BP (RouteSampleFFItemFulfilmentBPS) that was previously created needs to be configured with the following fields:
- transformationRuleset = the Ruleset created above.
- cockpitRuleset= com.cleo._customer_.booster.amp.fulfillment.AmpItemFulfilmentCockpitRS
The Application Route (SampleFFAmpItemFulfilmentRouteAR) in the com.cleo._customer_.amp.sample.ampff.fulfillment package has been configured to route the File from a File System ERP to Amazon.
Open the MANIFEST.MF file from the META-INF folder and add the package created above.