Вы находитесь на странице: 1из 39

PaaS4SaaS & X-PaaS Hands on Use Cases

8.1 – ICS-ERP Cloud Integration

Contents
PaaS4SaaS & X-PaaS Hands on Use Cases ........................................................................................................... 1

8.1 – ICS-ERP Cloud Integration ....................................................................................................................... 1

Introduction ..................................................................................................................................................... 2

StoryLine .......................................................................................................................................................... 2

Architecture ..................................................................................................................................................... 2

Products used & Versions .............................................................................................................................. 2

Build ICS Integration to Create Order in ERP Cloud ................................................................................ 3

Create connections in ICS ........................................................................................................... 3

Create Integration to ERP Cloud ................................................................................................. 9

Testing the Create Order Integration ....................................................................................... 25

Build Integration in ICS to Get Order Status from ERP Cloud .............................................................. 27

Create the Order Status Integration ......................................................................................... 27

Test the Order Status Integration ............................................................................................. 37

Summary ........................................................................................................................................................ 39

1|Page
Introduction
In this lab we will build integration to ERPCloud. We will build 2 integrations. First one to create the
order in ERP Cloud and the second one to get the status of order from ERP cloud.

These integration will be called from Mobile (MCS) and approved in PCS before ICS integration being
called to create order in ERP Cloud

StoryLine
Technician has been scheduled for an appointment with the customer since the predictive
maintenance has detected probable issue with the equipment in couple of days and is visiting the
customer site. While at customer site he determines that some parts needs to be replaced.
Technician orders the part using the mobile application on his mobile device. The order will go
through approval process, based on amount of parts ordered the approval will go through different
approver. Once the approval is completed the order will be created in ERP cloud and order number
is returned as part of notification to the technician.

Architecture

Here is the full architecture of the various components we are going to build in next couple of labs
and what we are focusing in this lab.

Products used & Versions


You would need the following products for this use case

 Oracle Integration Cloud Service


 Oracle ERP Cloud

Product versions used for this use case

Oracle Integration Cloud: 17.1.3

2|Page
Oracle ERP Cloud: Fusion GSI R12 Demo Release 01

Build ICS Integration to Create Order in ERP Cloud


Let’s build the integration in ICS which will create the Order in ERP Cloud

Create connections in ICS


Now let’s first create a generic REST connection which is triggered from outside and SOAP
connection into ERP cloud which is invoked from ICS.

 Login to your allocated ICS instance using the credentials provided.

 Refer to the ICS URL& credentials provided to you.


 Example: ICS instance URL https://integration-
jcsdemo0060.integration.us2.oraclecloud.com/ics/faces/global

 Click on Connections

 Click on New Connection

 Now type REST and click on Search to narrow down the selection

3|Page
 Select the REST connection

 Specify the name as PTFEOO_REST (Replace PTFEOO with your allocated username). Make
sure that the connection type is Trigger and Invoke. Click on Create to create the
Connection.

4|Page
 Now click on Configure Connectivity

 Provide the following values and click Ok to save.

Connection Type: REST API Base URL


TLS Version : TLSV1
Connection URL : http://httpbin.org

 Now click on Configure Security

5|Page

 Choose the security policy as No Security Policy. Click Ok

 Click Test at the top to test the connection

 After Test you should now see 100%. Click on Save to save the connection. You should see a
message now at the top

 Click on Exit connection to return back to main page.

 Now we can create the second connection which is SOAP connection to ERP cloud. You are
on the main connections page now. click on New Connection
 In the search window specify ERP Cloud and search. You should get the Oracle ERP Cloud
connector. Select the ERP Cloud connection..

6|Page
 Specify the following and click Create to create new connection
Connection Name: PTFEOO_ERPSOAP (replace the PTFEOO with the user allocated to you)
Identifier : Auto Populated
Connection Type: Invoke

 The basic connection is created

 Click on Configure Connectivity

7|Page
 Enter the following values and click Ok
WSDL URL: Use the ERP Services catalog URL for ERP cloud provided to you

 Click on Configure Security and provide following values. When done click Ok
Security Policy : Username Password Token
User Name : User provided to you
Password: password provided to you

 Click on Test at the top

 You should see successful test with 100% . Click on Save to save the connection.

8|Page
 Click on Exit Connection. We have now created the connections needed to build the
integration.

Create Integration to ERP Cloud


Now as we have created the integration. Let’s use that connection to build integration to
ERP cloud for creating order.
 Click on Integrations on the left

 Now click on New Integration to create the integration

 Select Basic Map Data

9|Page
 Specify the name as PTFEOO_ERPCLOUD_CREATEORDER (substitute PTFEOO with user
allocated to you). Click Create

 Now search for the connections you have created on the right side and select your REST
connection ex PTFEOO_REST
Select the REST connection

 Drag and drop it to the left hand side


 Provide the following values
What do you want to call your endpoint : CreateOrder
What is the endpoints relative URL : /CreateOrder

10 | P a g e
What action does the endpoint perform : POST
Select the Configure Request payload checkbox.
Note: If you don’t see request payload checkbox enabled, change the method to GET and
then to POST again. This should enable it.
Click Next

 For the Request Payload select JSON sample and choose the file ERPRequest.json (In same
directory as this lab document). Click Next

11 | P a g e
 Review the summary and click Done

12 | P a g e
 On the main page you should see this on the left hand side now

 Now lets build the right hand side (Call to ERP Cloud). Search for your connection example
PTFEOO_ERPSOAP

13 | P a g e
 Now Drag and drop it to the Right hand side as Invoke
 Call the connection as CreateERPOrder . Click Next

 The Browse By lists 2 values. “Business Objects” and “Services”

 Select services in the Browse By list box

14 | P a g e
• Search for PurchaseOrder. You will See 2 values show up in the result. The first one shows
active and the other one will say deprecated. You have to choose the one whose Lifecycle is
active obviously

• Choose the first search result ( PurchaseOrderService )

• Choose createPurchaseOrderAsync operation under “Select Operations to Perform business


and Service Fields”.

15 | P a g e
 Click Next
 In Response Tab, please choose Response Type as None
 Please provide a name for Identifier as CreateERPOrderResponse
 Please provide Version as 01
 Please provide Connector Type as erp

16 | P a g e
 Click Next

 Review the summary and click Done

17 | P a g e
 You should now see this in your screen

 Now we need to map the input and output fields for this integration. Highlight the mapping
and you should see a + . Click on it to map fields.

 Now map the fields as shown below


Left Hand Side Right Hand Side

OrderNumber OrderNumber

18 | P a g e
ProcurementBusinessUnit ProcurementBusinessUnit

BillToBusinessUnit BillToBusinessUnit

RequisitioningBusinessUnit RequisitioningBusinessUnit

SoldToLegalEntity SoldToLegalEntity

BuyerName BuyerName

Supplier Supplier

ItemDescription PurchaseOrderEntryLine->ItemDescription

CategoryName PurchaseOrderEntryLine->CategoryName

CurrencyCode PurchaseOrderEntryLine->
Price->CurrencyCode

Price PurchaseOrderEntryLine->Price

UnitOfMeasure PurchaseOrderEntryLine->UnitOfMeasure

UnitCode PurchaseOrderEntryLine->
Quantity->UnitCode

Quantity PurchaseOrderEntryLine->Quantity

ScheduleNumber PurchaseOrderEntryLine-
>PurchaseOrderEntrySchedule
->ScheduleNumber

ShipToOrganizationCode PurchaseOrderEntryLine-
>PurchaseOrderEntrySchedule
->ShipToOrganizationCode

ShipToLocationCode PurchaseOrderEntryLine-
>PurchaseOrderEntrySchedule
->ShipToLocationCode

Quantity PurchaseOrderEntryLine-
>PurchaseOrderEntrySchedule-
>PurchaseOrderEntryDistribution->Quantity

UnitCode PurchaseOrderEntryLine-

19 | P a g e
>PurchaseOrderEntrySchedule-
>PurchaseOrderEntryDistribution->Quantity-
>unitCode

Once the mapping is done Click on Filter on Right Hand side and select Mapped. Click Apply

Now you should see only the mapped fields on Right. Make sure that your mapping is
exactly as shown. If mapping is not perfect then Order Creation in ERP fails. If the mapping
is not as shown, Correct the Mapping.

20 | P a g e
 You can also test the mapping. Click on Test at the top of the page.

 Click on Generate Inputs to populate the input

 You should see the Input getting populated with sample data
Note: The values for the fields might be different for you as ICS inserts sample data.

21 | P a g e
 Now click on Execute on the top

 You should now see the output getting populated. Your output should be same in terms of
elements

 Click Close at the bottom to close the test window.

22 | P a g e
 Now click Save on the mapping window.

 You should see the message. Click on Exit Mapper to exit

 Click Save and Exit Mapper to exit.


Note: You can also do the testing of mapping as before but since its simple mapping with
only 3 fields you can skip it
 Now you should see the color of both maps changed to green and shows the Edit option.

 Click on the Tracking.


 Drag and Drop the OrderNumber . Click Done

 Now click on Save to save the integration. You should also see 100% complete

23 | P a g e
 Click on Exit Integration to exit the page

 Now we need to enable our integration. Back on the main screen locate your integration and
move the button to enable the integration. Make sure you are working on your integration.

 Click the Enable Tracing check box and Activate the integration. This will allow us to look at
the detailed logs.

 Now your integration should be enabled and you should see a message

 Now click on the I button to get the Metadata of your integration. Copy the metadata URL.
Copy it to notepad as well as you need it later to test the integration.

 Paste the URL in browser. (IE or chrome). Authenticate using the credentials provided to
you.
 After successful authentication you should see the metadata including input and output

24 | P a g e
Testing the Create Order Integration
Now that we have created the integration, let’s test the integration to make sure that we can
successfully create order in ERP cloud

 Open the PostMan or any other REST Client


 Copy the metadata URL from notepad and replace the /metadata with /CreateOrder in the
URL
https://<domain-name>/integration/flowapi/rest/PTFEOO_ERPCLOUD_CREATEORDE
/v01/CreateOrder

Where domain name is your actual ICS domain


 Select the Method as POST in PostMan

 Now click on Authorization, Select Basic Auth and provide your ICS credentials allocated to
you.

 Now click on Body -> Raw -> Select JSON

25 | P a g e
It should now show like this below

 Now in the body paste the following


{
"OrderNumber":"PTFEOO",
"ProcurementBusinessUnit":"US1 Business Unit",
"BillToBusinessUnit" : "US1 Business Unit",
"RequisitioningBusinessUnit" : "US1 Business Unit",
"SoldToLegalEntity":"US1 Legal Entity",
"BuyerName":"Roth, Calvin",
"Supplier":"Lee Supplies",
"ItemDescription":"Printer M32240",
"CategoryName":"Printers",
"CurrencyCode":"USD",
"Price":"200",
"UnitOfMeasure":"Ea",
"UnitCode":"Ea",
"Quantity":"2",
"ScheduleNumber":"2",
"ShipToOrganizationCode":"001",
"ShipToLocationCode":"Seattle"
}

Note: If you are using your own ERP environment, please consult your functional folks to
get the appropriate Master data for Creating Order in your system and substitute in the
above Request.

26 | P a g e
 Now click on SEND to send the request. After waiting for some time you should see the
response like below at the bottom of your POSTMAN window.

 Now we have completed developing ICS integration for creating order in ERP Cloud.

Build Integration in ICS to Get Order Status from ERP Cloud


Now we will build a second integration which will get the status of the Order given OrderNumber
and SoldToLegalEntity as the input. Since we have the connections created already we can reuse
the connections for this integration.

Create the Order Status Integration


 Click on Integrations on the left

27 | P a g e
 Click on New Integration

 Select Basic Map Data


 Provide the name as PTFEOO_ERPCLOUD_GETORDERSTATUS and click Create
Note: Substitute PTFEOO with the user name allocated to you.

28 | P a g e
 Now Search for the connection you have created PTFEOO_REST (Substitute the PTFEOO with
your username)

 Drag and drop on the left side as Trigger.


 Specify the following and click Next
Name : GetOrderStatus
EndPoint : /getOrderStatus
Action: Post
Select Request and Response Payload.

 For request Specify JSON Sample and choose the file ERP-GetStatus-Request.json. Click
Next
Note: ERP-GetStatus-Request.json is in same folder as this lab use case document

29 | P a g e
Note : “When you choose the sample json file and the option changes to json and they can
also see the sample “inline”. They don’t get to see the file name or anything else (to confirm
whether the file upload was successful)”
 For the Response choose JSON Sample and select ERP-GetStatus-Response.json and click
Next

30 | P a g e
Note : “When you choose the sample json file and the option changes to json and they can
also see the sample “inline”. They don’t get to see the file name or anything else (to confirm
whether the file upload was successful)”

 Review the summary and click Done

Save the Adapter Configuration

 Now let’s build the integration on right hand side. Search for your connection
PTFEOO_ERPSOAP (substitute ptfexx with your allocated user name)

 Drag and drop to the right hand side as Invoke


 Specify the name as GetERPOrderStatus click Next

31 | P a g e
 In the operations screen, select Services for “Browse By”.
 Under Select a Service, select the filter “Active” and search PurchaseOrderService. Click on
the result.

32 | P a g e
 Select “findPurchaseOrderByOrderNumber” as the Operation to Perform.

 Click “Next” and then “Done”.

33 | P a g e
 You should see the following now

 Hover mouse around First mapping (Request) and click +

 Map the fields as shown below. Click on Save and Exit Mapper

 Now lets map the Response , hover the mouse over second mapping and click on +

34 | P a g e
 Map the values as shown in table
Left Hand SIde Right Hand Side

findPurchaseOrderByOrderNumberResponse OrderNumber
>Value->OrderNumber
findPurchaseOrderByOrderNumberResponse POHeaderId
>Value->POHeaderId
findPurchaseOrderByOrderNumberResponse DocumentType
>Value->DocumentType
findPurchaseOrderByOrderNumberResponse DocumentStatus
>Value->DocumentStatus
findPurchaseOrderByOrderNumberResponse LineItemDescription
>Value->PurchaseOrderLine->ItemDescrption
findPurchaseOrderByOrderNumberResponse LineStatusCode
>Value->PurchaseOrderLine->LineStatusCode

Click Filter on the Left Hand Side and Select Mapped and Apply.

35 | P a g e
Your mapping should look like below

 Click on Save and then Exit Mapper


 Now back on main screen click on Tracking

 Drag and drop OrderNumber . Click on Done

 You should now see integration 100%. Click Save and then Exit Integration

 Now Activate your integration

 Select on Enable Tracking and click on Activate


36 | P a g e
 Your integration should be now Active

Test the Order Status Integration


Now let’s test the integration to make sure that its working.

 Hover the mouse over I button to get the metadata. Copy the URL to Notepad
https://<integration-
domain>/integration/flowapi/rest/PTFEOO_ERPCLOUD_GETORDERST/v01/metadata
Note: substitute the <integration-domain> with your domain and PTFEOO with your
username. Also cross check your URL.
 Now remove the /metadata from URL and add /getOrderStatus . The final URL will be
https://<integration-
domain>/integration/flowapi/rest/PTFEOO_ERPCLOUD_GETORDERST/v01/getOrderStatus
 Open POSTMAN , copy and paste the URL. Select the method as POST
 Under Authorization, select Basic Auth . Provide your ICS credentials
 Click on Body -> Raw . Select JSON(application/json)

37 | P a g e
 Now for the Body provide following
{
"OrderNumber":"PTFEOO",
"SoldToLegalEntity":"US1 Legal Entity"
}

 Click on SEND to make the request.


 After sometime you should see the response at the bottom window

 This validates that your integration is working properly.


 You can also look at the trace. Back in ICS click on Monitoring

 Now click on Integrations on the left

38 | P a g e
 You should see your integration on the right hand side with 1 successful message

 Clicking on Success will show you the input for the integration

We have now completed building both integrations needed for our use case.

Summary
In this use case we have build CreateOrder ICS integration to create order in ERP cloud and Get
Status ICS integration for getting the status of the integration from ERP cloud.

We will be using these in upcoming lab use cases.

39 | P a g e

Вам также может понравиться