This flow contains process orchestration logic to perform these operations:
- Receive a flat file and then translate it to a JSON payload (CreateOrderFulfilmentRequest).
- Submit that payload to Shopify using the correct APIs.
Once the request has been submitted to Shopify, the Order Fulfillment process will take place for the specific order.
This is a high-level description of the steps taken to configure the Order Fulfillment (Shipment) Flow:
- Configure the objects to retrieve shipment payload from the ERP (DARS and Launcher Business Process).
- Create the Application Route to route the payload to Shopify.
- Create the transformation Ruleset with the required mapping to convert the ERP's Shipment payload to the Shopify fulfillment JSON.
- Configure the Business Process to transform and send the shipment to Shopify.
Detailed Configuration Steps
Guidelines for each configuration step are described here.
Configure ERP objects
- Create a package in the ERP project (see Project Configuration (ERP, Intersection Projects)) to add the objects that reference the shipment flow. Recommended package name: com.cleo._customer_.erpname
- Copy the Application Interface -SampleShopifyFFAI (found in com.cleo._customer_.booster.sample.shopifyff) and paste it into the package created above. It should then be renamed to match the target ERP and file format type (for example, ShopifyErpnameAI.appInterface).
- Create a package in the ERP project (see Project Configuration (ERP, Intersection Projects)) to add the objects with reference to the fulfillment flow. Recommended package name is com.cleo._customer_.erpname.fulfillment.
- Create several objects in the package created above. These include a Schema, Ruleset (DARS), and launch Business Process.
a) Schema: Create a Schema (type based on ERP). Note that a sample schema has been provided in the sample project - SampleShopifyFFItemFulfillmentFF.ffSchema - inside the com.cleo._customer_.booster.sample.shopifyff.fulfillment package.
b) Data Analysis Ruleset (DARS): Using the Schema created above as the source, create the DARS Ruleset. See the SampleFFItemFulfillmentDARS residing in com.cleo._customer_.booster.sample.shopifyff.fulfillment package for reference.
c) Launch Business Process: Create a BP with template - No Template. Refer to the sample - LaunchSampleFFItemFulfillmentBPS found in com.cleo._customer_.booster.sample.shopifyff.fulfillment.
The first task in the BP is to retrieve the shipment payload from your ERP.
If your integration is file-based, then you'll need to create an endpoint for that required type. See Managing-Endpoints for more information.
- Next you will need to create a dataflow with the source being the endpoint you just created. The target is the transformation endpoint. For reference, see the SampleFFItemFulfillment.event (in the com.cleo._customer_.booster.sample.shopifyff package). This triggers the LaunchSampleFFItemFulfillmentBPS.bps.
- A similar event should be created by the user; the LaunchBP must be called by this Event.
For non file-based integrations, configure your necessary objects (WSC, WSP, Adapter/Connector calls to retrieve the data).
- Create a task to call the DARS that you created above.
Open the Project's MANIFEST.MF file.
a) From the Runtime tab, add the new packages created above.
b) From the Dependencies tab, add com.cleo.b2bcloud.core
Configure the Shopify ERP Intersection Project
- Set dependencies by adding dependent projects shown in the image below.
- Create a package in the intersection project (see Project Configuration (ERP, Intersection Projects)) which will be used to add objects that reference the fulfillment flow. These include a Ruleset, route BP, and Application Route.
Note: Add this package as a dependency to the Project using the MANIFEST.MF file and Runtime tab.
Note the recommended package name: com.cleo._customer_.shopify.erpname.fulfillment.
a) Ruleset: Create a new transformation Ruleset. Use the schema created above as source; use a JSON schema as target. The JSON schema to be used is com.cleo.cic.connector.shopify.orders.CreateOrderFulfillmentRequest.jsonSchema.
It is mandatory that you map the process environment variable envLomId to the environment variable Log_of_Message_Id (shown below).
In the Ruleset, add a rule ProcessEnvironment_GetStringValueAction and add a source property value as a hardcoded string value envLomId, and 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. Save the changes.
Example Ruleset: The FFItemFulfillmentToShopifyItemFulfillmentRS.ruleset is located in the com.cleo._customer_.shopify.sample.shopifyff.fulfillment package, and has been configured to convert Flat File(CSV) file to Shopify OrderFulfillment (as an example).
b) Route Business Process: Copy and paste the RouteFFShopifyItemFulfillmentBPS.bps in the sample Intersection project com.cleo._customer_.shopify.sample.shopifyff.fulfillment and then rename it as RouteERPItemFulfillmentBPS. This contains the necessary logic to process this payload further. In this BP, the payload gets translated to the Shopify-supported format.
c) Application Route. Create a new Application Route object with the Application Matching Parent previously created (see Configure ERP Objects, above) using these parameters:
- DocType as the document name
- Target as Shopify
- SourceApp as the ERP (same values should be configured in DARS previously created in Configure ERP Objects, above).
In the sample, DocType is 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 (RouteFFShopifyItemFulfillmentBPS) created in step (b) above needs to be configured with these fields:
- transformationRuleset = the Ruleset created in the section above.
- cockpitRuleset= com.cleo._customer_.booster.shopify.fulfillment.ShopifyItemFulfillmentCockpitRS
Example Application Route: The Application Route FFShopifyItemFulfillmentRouteAR in the com.cleo._customer_.shopify.sample.shopifyff.fulfillment package has been configured to route the File from a File System ERP to Shopify (as an example).
How to Run the Order Fulfillment Flow (including deployment steps)
Please sign in to leave a comment.