Oracle by Example brandingCreating an Action Chain for Price Information

section 0Before You Begin

This 15-minute tutorial shows you how to create an action chain to retrieve the order detail information and populate the variables.


section 1Creating an Action Chain for Price Information

To create an action chain to retrieve the order detail information and populate the variables:

  1. On the Actions section of the customer_search_product_price_availability-customer_price page, create a new action chain with this value:
    • ID = GetPriceInfo
  2. Drag and drop the Assign Variables action below Start.
  3. Rename ID as FinishGetPriceFalse.
  4. Click Assign next to Variables. On the Assign Variables: FinishGetPriceFalse dialog box, select FinishGetPrice on the right pane. Enter false in the text area and select Static Content.

    The Assign Variables dialog box should look like this:

    Description of 1.png follows
    Assign Variables
  5. Drag and drop the Call REST Endpoint action below Assign Variables. Set ID as callGetPriceInfoORCH, select jderestV3Orchestrator, and then select JDE_ORCH_CustomerSearch_GetCustomerPrice as the endpoint.
  6. Select Assign next to Parameters. In the Call REST Endpoint: callGetPriceInfoORCH dialog box, select Parameters and then body in the right pane and provide the following input parameters of the orchestration:

    {
     "Item_Number": $flow.variables.Flow_Item,
     "Address_Number": $page.variables.CustNo,
     "Branch_Plant": $page.variables.BU,
     "Adjustment_Schedule": $page.variables.AdjSchd,
     "Quantity_From": $page.variables.QtyFrom,
     "Pricing_UOM": $page.variables.PricingUOM,
     "Price_Effective": $page.variables.PriceEffDate,
     "token" : $application.variables.aisToken,
     "deviceName":"MyDevice"
    }

    The Call REST Endpoint: callGetPriceInfoORCH dialog box should look like this:

    Description of 2.png follows
    Call Rest Endpoint
  7. Drag and drop the Assign Variables action in the success path of Call REST Endpoint. Set ID as assignPriceDetails.
  8. Click Assign and Action Chain, Results, callGetPriceInfoORCH, body, ServiceRequest1, fs_P4074_W4074D, data, gridData, rowset, on the left pane and AdjDetails variables on the right pane.

    The Assign Variables dialog box should look like this:

    Description of 32.png follows
    Assign Variables
  9. Again click Assign and select the PriceDetails variable on the right pane and paste the following code:
    {
     "data": {
      "z_ASN_38": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_ASN_38 }}",
      "z_CRCD_17": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_CRCD_17 }}",
      "z_CRR_30": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_CRR_30 }}",
      "z_CRRM_14": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_CRRM_14 }}",
      "z_PEFJ_36": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_PEFJ_36 }}",
      "z_UNCS_48": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_UNCS_48 }}",
      "z_UPRC_44": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_UPRC_44 }}",
      "z_UOM4_40": "{{ $chain.results.callGetPriceInfoORCH.body.ServiceRequest1.fs_P4074_W4074D.data.z_UOM4_40 }}"
     }
    }

    The Assign Variables dialog box should look like this:

    Description of 5.png follows
    Assign Variables
  10. Drag and drop the Assign Variables action under this Assign Variables action.
  11.  Rename the ID as FinishGetPriceTrue.
  12. Click Assign next to Variables. In the Assign Variables: FinishGetPriceTrue dialog box, select FinishGetPrice on the right pane. Enter true in the text area and select Static Content.

    The Assign Variables: FinishGetPriceTrue dialog box should look like this:

    Description of 11.png follows
    Assign Variables

    Part of your action chain should look like this:

    Description of 12.png follows
    Action Chain Preview

    To create the rest of the variables and action chains required for this page, follow these steps:

  13. Select customer_search_product_price_availability-customer_price from the navigator section.
  14. Select the Metadata or JSON icon for customer_search_product_price_availability-customer_price.
    Description of 30.png follows
    Metadata or JSON Section
  15. Click here to copy and replace the given code in the Metadata or JSON section.