Below are the high-level steps to configure the Order Flow:
- Configure schedulers to retrieve orders from Shopify at a specific interval.
- Define the transformation steps required to convert a Shopify Order Payload to the file format required by the ERP.
- Integrate with the ERP system to send the Transformed Orders to ERP.
- Configure Routes and Business Processes to transform and send the orders to the ERP.
Detailed configuration steps are provided below.
Setup objects in ERP/ target project
- Create the customer ERP project com.cleo._customer_.erpname as described in Project Configuration (ERP, Intersection Projects).
- Setup all required objects in package com.cleo._customer_.erpname through the steps below:
- Copy object ShopifyAI.appInterface located in project com.cleo._customer_.booster.shopify in package com.cleo._customer_.booster.shopify.
- Paste it in project com.cleo._customer_.erpname under package com.cleo._customer_.erpname.
- After pasting it, rename it to match the target ERP and file format type; for example, ErpnameFFAI.appInterface.
- Save the changes.
- Configure the MANIFEST.MF file located in META-INF folder. Open MANIFEST.MF file.
- Go to the ‘Runtime’ tab. Click “Add”
- Add the newly created packages configured in Step 2 (com.cleo._customer_.erpname.order and com.cleo._customer_.erpname) as shown below. Save the changes.
Setup objects in Shopify and ERP/ target intersection project
- Create the Shopify to ERP intersection project com.cleo._customer_.shopifyerpname as described in Project Configuration (ERP, Intersection Projects).
- Setup required objects in package com.cleo._customer_.shopifyerpname through the steps below:
- Copy object CommaTFTS.tfSettings located in project com.cleo._customer_.shopify.sample.shopifyff in package com.cleo._customer_.shopify.sample.shopifyff.
- Paste it in an intersection project.
- Save the changes. This is the default transformation settings file. It can be updated as per user requirements. More details about configuring transformation settings can be found here
- Configure the MANIFEST.MF file located under the META-INF folder now.
- Open MANIFEST.MF file.
- Go to the ‘Dependencies’ tab and add dependent projects as com.cleo.b2biaas.clarify, com.cleo.cic.cockpit.core, com.cleo.cic.util, com.cleo.b2bcloud.core, com.cleo._customer_.booster.shopify, com.cleo._customer_.erpname as shown in the image below.
- Save your changes.
- Core order packages - Create package com.cleo._customer_.shopifyerpname.order, com.cleo._customer_.shopifyerpname.orderUpdate, and com.cleo._customer_.shopify.sample.shopifyff.cancelledOrder in project com.cleo._customer_.shopifyerpname.
- Configure the ruleset:
- Create a ruleset with the preferred name ShopifyOrderToErpnameFFRS , ShopifyOrderUpdateToErpnameFFRS , ShopifyCancelledOrderToErpnameFFRS. The name should match the target destination/ ERP and format (for example. FF in the sample project).
- Select source format as ‘JSON’ and target format as the desired type. We have used flat file target schema type in the sample.
- Select source schema “GetOrdersResponse.json” located in project com.cleo.cic.connector.shopify under package com.cleo.cic.connector.shopify.orders.
- Select target schema, ErpnameOrderFF.ffSchema, located in package under project com.cleo._customer_.erpname. Save the changes.
- In the transformation ruleset, add a rule ‘ProcessEnvironment_GetStringValueAction.
- Set the source property value to 'envLomId'. Set the target environment variable to env.Log_of_Message_Id . This is required for cockpit tile creation and should ideally be the first rule in the transformation ruleset.
- Save the changes.
- User should create the rest of the field mapping rules as per the requirement and save the changes. Refer link for details about creating rulesets.
- Create a scheduler object LaunchShopifyOrderPS.sched and LaunchShopifyCancelledOrdersPS.sched inside project and packages created here. Update the desired recurrence as per the user requirement and save the changes. The process schedules LaunchShopifyOrderPS.sched, LaunchShopifyCancelledOrdersPS.sched in the sample project com.cleo._customer_.shopify.sample.shopifyff.order have been configured to run every 1 hour as an example. Refer Creating and Defining Process Schedules – Cleo for details about creating and defining the process schedulers.
- Copy object RouteShopifyFFNewOrderBPS.bps located in project com.cleo._customer_.shopify.sample.shopifyff in package com.cleo._customer_.shopify.sample.shopifyff.order. Paste it in project com.cleo._customer_.shopifyerpname under package com.cleo._customer_.shopifyerpname.order . User should update route BPS name to match their ERP and file format type for example, RouteShopifyErpnameFFOrderBPS.bps to match the ERP and target format (FF/flat file is being used as an example here.).
- Save the changes.
- Copy object RouteShopifyFFOrderUpdateBPS.bps located in project com.cleo._customer_.shopify.sample.shopifyff in package com.cleo._customer_.shopify.sample.shopifyff.orderUpdate. Paste it in project com.cleo._customer_.shopifyerpname under package com.cleo._customer_.shopifyerpname.orderUpdate . User should update route BPS name to match their ERP and file format type eg. RouteShopifyErpnameFFOrderUpdateBPS.bps to match the ERP and target format (for example, FF/flat file is being used as an example here.).
- Save the changes.
- Copy object RouteShopifyFFCancelledOrderBPS.bps and RouteShopifyFFNewCancelledOrderBPS.bps located in project com.cleo._customer_.shopify.sample.shopifyff in package com.cleo._customer_.shopify.sample.shopifyff.canceledOrder. Paste it in project com.cleo._customer_.shopifyerpname under package com.cleo._customer_.shopifyerpname.cancelledOrder . User should update route BPS name to match their ERP and file format type for example, RouteShopifyErpnameFFCancelledOrderBPS.bps to match the ERP and target format (FF/flat file is being used as an example here.)
- Save the changes.
- The route BPSs would have an error in task “SendOutput”. Delete these tasks. Save the changes.
- Add a new task (in place of the deleted tasks in all the above route BPSs) to send the output to the destination ERP/ api consumer endpoint or cloud adapters based on the customer use case. Eg. in order to write the file to a target sample cloud endpoint, a new task labeled “SendOutput” can be added. Call object “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.
- Save the changes.
- Create new application route objects matching application ‘Parent’ as com.cleo._customer_.booster.shopify.ShopifyAI.appInterface and parameters DocType - NEWORDER/ ORDERUPDATE, CANCELLEDORDER, NEWCANCELLEDORDER and SourceApp - SHOPIFY , Route BPs created above, with Fields -
- transformationRulesets = ruleset created earlier for fresh order , order update, order cancellation
- cockpitRuleset=com.cleo._customer_.booster.shopify.orders .ShopifyOrderSalesOrderCockpitRS.ruleset/ShopifyOrderSalesOrderUpdateCockpitRS.ruleset, ShopifyCancelledOrderToFFSalesOrderRS.ruleset(also ShopifyNewCancelledOrderTransformationRS.ruleset) for new orders, update orders , canceled orders respectively
- Save your changes
- The Application Route SampleShopifyFFOrderRouteAR.appRoute in the com.cleo._customer_.shopify.sample.shopifyff.order package, SampleShopifyFFOrderUpdateRouteAR.appRoute in the com.cleo._customer_.shopify.sample.shopifyff.orderUpdate package and ShopifyCancelledOrderToFFSalesOrderRS.ruleset in the com.cleo._customer_.shopify.sample.shopifyff.cancelledOrder have been configured to route the Shopify fresh/updated order payloads to a File System ERP.
Refer to Defining-Application-Routes for details about creating and defining the Application Routes.
- Configure MANIFEST.MF file located under META-INF folder for ‘Runtime’ now.
- Open MANIFEST.MF file.
- Go to the ‘Runtime’ tab . Click on “Add” and add the newly added packages com.cleo._customer_.shopifyerpname.order , com.cleo._customer_.shopifyerpname, com.cleo._customer_.shopifyerpname.order, com.cleo._customer_.shopifyerpname.orderUpdate, com.cleo._customer_.shopifyerpname.orderCancelled as shown below
Comments
0 comments
Please sign in to leave a comment.