- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
The journey with ZCC for ERP is focused on a unified approach to ERP integration, where e.g. a single ERP or Platform Model can be reused across the platform in scenarios/patterns like Flow Designer, Remote Tables, ETL processes, and Data Fabric tables. By reusing the same Models across multiple integration patterns, teams gain faster development cycles, simpler maintenance, and far more consistent results. With the latest ZCC for ERP release, the same Model can now also be used in a new capability: The Scripted API in ZCC for ERP.
This new feature allows teams to use fully customisable Scripted API's built directly on top of ZCC for ERP Model Manager, giving developers more flexibility and real-time access options. In practice, this extends the existing model-driven approach and opens a new way to deliver ERP integrations with much higher complexity and greater control.
Let's have a look how easy it is to get started with Scripted API. In the following example we will use the Scripted API to get an overview of which Plants exist in SAP.
-
We will use the prebuilt ERP Model "DP: Plant" from the ERP Data Products to accelerate the implementation. You can download the ERP Model and other Foundation/Master Data Models from the ServiceNow Store When you have installed the ERP Data Product, you will have the ERP Model available in ZCC for ERP Model Manager
-
Then we will visit the doc's for the new Scripted APIs to understand how the new feature works in practice, explore configuration examples, and see how the ERP Model for "DP: Plant" is applied when using the API
-
Let's see how easy it is to use. I want to query ZCC for ERP to get an overview of which ERP systems I can use for my integration:
// Get all available systems
var systems = new sn_erp_integration.API().getAvailableSystems();And the API returns the following information, giving me insights into which systems I can use for my Plant query:
[
{ id: "sap_s4hana_2023",
name: "sap s4hana 2023"
},
{ id: "sap_ecc",
name: "sap ecc"
},
{ id: "sap_successfactor_odata",
name: "SAP SuccessFactor Odata"
},
{ id: "sap_s4hana_cloud",
name: "SAP S4Hana Cloud"
}
] -
Now, lets try to query the SAP system called "sap_s4hana_2023" and see which Plants are available there. For this query we use the ERP Model "DP: Plant", and we will need to lookup the virtual table name for this ERP Model in the table called: "sn_erp_integration_model"
- Lets put it altogether in the Scripted API - and remember to use the virtual table name for the Model:
var api = new sn_erp_integration.API()
.system('sap_s4hana_2023')
.model('sn_erp_cp_mdm_dp_plant')
.operation('read')
.execute();When you run the script you will get an array with all available Plants in that system:
[
{ plants_branches_name_2: "Hamburg Central",
plants_branches_country_region_key: "DE",
plants_branches_city: "Hamburg",
plants_branches_plant: "1010",
plants_branches_region: "",
plants_branches_name_1: "Hamburg Central 1010"
},
{ plants_branches_name_2: "US Remote - North",
plants_branches_country_region_key: "US",
plants_branches_city: "New York",
plants_branches_plant: "7010",
plants_branches_region: "",
plants_branches_name_1: "Plant 7010 US Remote - North"
}
]
The Scripted API offers cool features to build complex queries and encoded queries. You can work dynamically on both input and output of the models and use scripting for setting/changing values in both create and update scenarios etc. Have a look at the doc's for even more detailed examples.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
