Create flowservice for Coupa SupplierItems to Servicenow PurchaseOrder in webMethods.io

Summary:

 This article describes the step-by-step process of creating a FlowService in webMethods.io New Flow Editor for the data sync between Coupa   “SupplierItems” and Servicenow “PurchaseOrder” .

Prerequisites:

  • User needs to have a working Coupa account, to log into the Coupa tenant
  • User needs to have a working Servicenow account, to log into the Servicenow tenant
  • Access permission for Coupa APIs and Servicenow APIs
  • Working webMethods.io tenant

Contents:

How to create a flow service get Supplier Items from Coupa and create a purchase order in Servicenow.

 

Steps to create flowservice for Coupa “SupplierItems”  to Servicenow “PurchaseOrder” in webMethods.io :

    1. Login to webMethods.io integration

    2. Click on Project and navigate to FlowServices

                  

3. Create a flowservice and provide a name.

 

4. Start typing try and select Try...Catch... from dropdown options.

5.  To add a comment click on the dots on the right side of the control and select “Comment“ from the dropdown.

6.  Start typing transform and select Transform Pipeline from dropdown

7.  Add “getCurrentDateString“  and map to “startDateTime“ and “endDateTime“.

     

 

8.   Add “incrementDate“ and map I/O as below:

            startDatePattern: yyyy-MM-dd'T'HH:mm:ss'Z'

            endDatePattern: yyyy-MM-dd'T'HH:mm:ss'Z'

            addDays: -60

      

9.  Add Coupa connector and add custom operation.

          Create Coupa account by providing all the details.

          

 

            Fill in other details:

            

          Select “Query“

          

        Select “Supplier_Items“:

         

       Select all the fields:

       

 

        Review details and click on done:

        

 

10. Select “ServiceNow Enterprise Service Management“ connector and create custom operation “createPurchaseOrder“.

       

       Fill in the details to create an account:

       

 

        Select “Insert Record“ in Operation.

        

 

      Select “Purchase Order“ in business object“

      

 

 

       Select all the fields:

       

 

          On next screen review summary and click on done.

11.   Add Repeat on supplier_item:

 

      

 

12.  Add Coupa connector and create “querySupplierList“ operation.

            Follow steps similar to step 9 in this article and select “suppliers“ in Business object. Select required fields.

13.  Do mapping as below:

 

     

14.  Add repear and if-else condition as below and add other steps as shown:

     

For creating custom operation highlighted in above screenshot follow Steps similar to step 10 and select “Insert Record“ in operation and “ proc_po_item“ in Business object.

15.  Run the service. No input required.

      Result: