Below are the high-level steps to configure the Order Flow:
- Configure a Scheduler to retrieve orders from Amazon Seller Central at specific intervals.
- Define the transformation steps needed to convert the Amazon Order Payload to the file format required by the ERP.
- Integrate with the ERP system to send the Transformed Orders to ERP.
- Configure Routes & Business Processes that are used to transform and send the orders to the ERP.
Detailed configuration steps are provided below.
Setting up Resources in the ERP/target Project
- Create the customer ERP project com.cleo._customer_.erpname as described in Configure the Customer ERP Project.
- Take these steps to set up the required objects in the com.cleo._customer_.erpname package:
- Copy the SampleAmpFFAI2.appInterface (located in project: com.cleo._customer_.booster.sample.ampff into the com.cleo._customer_.booster.sample.ampff package and paste it into the com.cleo._customer_.erpname under package com.cleo._customer_.erpname.
- Once pasted, rename it to match the target ERP and file format type (eg. ErpnameFFAI2.appInterface).
- Save the changes.
- If it is file-based integration, create an Endpoint of the required type:
- Then, create a dataflow with transformation as the source endpoint and the endpoint created in this step as target.
- For file based integration, copy the object: SampleAmpFFWriteAdapterAD.cloud.adapter - which is located in the com.cleo._customer_.booster.sample.ampff project (package = com.cleo._customer_.booster.sample.ampff) and paste it into the following project: com.cleo._customer_.erpname under package com.cleo._customer_.erpname.
- Once pasted, rename it to match the target ERP and file format type (eg. ErpnameFFWriteAdapterAD.cloud.adapter).
- Save your changes. Note: This is a sample target cloud adapter that could be used to write files to an endpoint.
- Otherwise configure necessary objects like WSC, adapters or connector calls to send the data depending on the target mode of file transfer.
-
In the com.cleo._customer_.erpname project, create a package com.cleo._customer_.erpname.order.
Note: In the in sample project com.cleo._customer_.booster.sample.ampff.order, there is the package of the same name that contains the SampleAmpFFOrderFF.ffSchema.
This sample flat-file system schema is used as the target schema for the AMP API Orders.
Create a new target schema (any format) in the com.cleo._customer_.erpname Project (described in Configure the Customer ERP Project),inside package com.cleo._customer_.erpname.order.
The new schema could vary based on the format being used. For example, if the format is flat-file then the object could be named ErpnameOrderFF.ffSchema. - Configure the MANIFEST.MF file (located in the META-INF folder).
-
- Open the MANIFEST file.
- Select the Runtime tab, and add the newly created packages configured in the above steps. (com.cleo._customer_.erpname.order and com.cleo._customer_.erpname). See below.
- When done, save your changes.
- Go to the ‘Dependencies’ tab and add dependent projects (com.cleo.b2biaas.clarify, com.cleo.cic.cockpit.core, com.cleo.cic.util, com.cleo.b2bcloud.core, com.cleo.cic.connector.amp). See below.
- Save your changes.
Setting up Resources in the AMP and ERP/ target Intersection Project
- If not done already, Create and Configure AMP and ERP Intersection Project.
Name it com.cleo._customer_.amperpname
Set up the required resources in the following package: com.cleo._customer_.amperpname
Copy the CommaTFTS.tfSettings (from com.cleo._customer_.amp.sample.ampff Project/ com.cleo._customer_.amp.sample.ampff package).
Paste it into the Project and package that was created as part of the steps to Configure the Customer ERP Project).
Save your changes. This is the default Transformation Settings object. It can be updated as required.
Set dependencies.
Open the MANIFEST.MF file from the META-INF folder.
From the Dependencies tab, add all dependent projects (com.cleo.b2biaas.clarify, com.cleo.cic.cockpit.core, com.cleo.cic.util, com.cleo.b2bcloud.core, com.cleo._customer_.booster.amp, com.cleo._customer_.erpname). See below.
Save your changes.
In the com.cleo._customer_.amperpname Project, create the following package: com.cleo._customer_.amperpname.order.
Create and Configure a Transformation Ruleset
- Create a new ruleset (recommended name: AmpOrderToErpnameFFRS.ruleset). The name should match the target destination/ ERP and format (for example, flat-file in the sample project).
We will use a JSON source schema, and target schema based on the required target format. - Use the AmpOrderJSON.jsonSchema as the source. It is located in AMP Booster project (com.cleo._customer_.booster.amp) under package (com.cleo._customer_.booster.amp.orders).
- Use the ErpnameOrderFF.ffSchema as target. This schema is located in the com.cleo._customer_.erpname Project. This was created in the above section for Setting Up Resources for ERP/Target Project.
- Save your changes.
- Add the following rule: ProcessEnvironment_GetStringValueAction
The source property value should be the hardcoded string value envLomId.
Set the target as environment variable env.Log_of_Message_Id.
This is required for CIC Cockpit tile creation and should ideally be the first rule in the Ruleset. See this sample below. - At this point, the user should create all remaining field mapping rules as per specific requirements.
- Save your changes.
Create and Configure Process Scheduler
- From the Project and package created in your Customer ERP Project (see Configure the Customer ERP Project), create a Process Scheduler and name it: LaunchAmpFbmOrderPS.sched
- Set the recurrence based on specific user or customer requirements.
- Save your changes.
Related topic: Creating and Defining Process Schedules
Create and Configure Route BPs
Purpose of this route BP is to take the input payload of an individual order, translate it and send it across to the target ERP/ API or filesystem. Route BP also has steps to capture the message-related information in the cockpit along with logic to handle error alerts and display errors in the cockpit.
- From the com.cleo._customer_.amp.sample.ampff Project/com.cleo._customer_.amp.sample.ampff.order package, copy the RouteAmpFbmSampleAmpFFOrderBPS.bps and paste it into the com.cleo._customer_.amperpname.orderpackage under the com.cleo._customer_.amperpname project.
- Users should update the Route BP name so that it matches their ERP, file format type, etc.
For example, RouteAmpFbmErpnameFFOrderBPS.bps should match the ERP and target format (eg. FF/flat file is being used as an example here). - The Route BP would have an error in the SendOutput task, which should be deleted.
- Save your changes.
- Add a new task below SetLomIdContextNodesCockpitBPS to send the output to the destination ERP/API consumer endpoint or cloud adapter (based on customer use case).
- For example: in order to write the file to a target sample cloud endpoint, a new task SendOutput can be added.
- Call the com.cleo._customer_.erpname.ErpnameFFWriteAdapterAD.cloud.adapter in Task, and add Fail task as StandardError. Update property docType and fileName as desired eg. docType can be Order and filename can be ErpFileName.txt.
- Create an Application Route (shown below).
- Matching application Parent = com.cleo._customer_.booster.amp.AmpAI
- Parameters DocType = ORDER
- SourceApp = AMAZON
- For Process Binding, use the Route BP created above, withthese Fields:
CockpitRuleset = com.cleo.customer_.booster.amp.orders.AMPOrderSalesOrderCockpitRS
TransformationRuleset = com.cleo.customer_.amperpname.AMPOrderToErpnameFFRS
Related topic: Defining-Application-Routes.
Set Dependencies
- Open the MANIFEST file.
- Select the Runtime tab, and add the newly created packages configured in the above steps. (com.cleo._customer_.amperpname.order and com.cleo._customer_.amperpname).
- Close and save your changes.
Related Topic
How to Run the Order Flow (including deployment steps)
Comments
0 comments
Please sign in to leave a comment.