Assuming that property impex.legacy.scripting is set to false and ‘Enable code execution’ is
checked, what are the results of the following ImpEx script? INSERT_UPDATE
Title;code[unique=true] #%groovy% beforeEach: line.clear(); ;foo; ;bar; ;baz;
Show answerHide answer
Correct answer: ANo entries will be updated or inserted.
Explanation
Explanation:
The key to this question lies in the beforeEach: line.clear(); Groovy script and how it interacts with the Impex data rows.
Why Other Options Are Incorrect:
Option B is incorrect because the line.clear() method executes for every row, not selectively. All rows are cleared, so "baz" would also be cleared and not processed.
Option C is incorrect because line.clear() completely removes all cell values from the row; it does not trim whitespace or perform any cleaning operations on the data.
Option D is incorrect because all data rows are cleared by the script, preventing any of the codes from being processed and imported.
References:
SAP Community discussion on Impex scripting with beforeEach and line object
SAP Help Portal documentation on ImpEx scripting capabilities
Question 12Choose 3
You need to create a CronJob for an automated task that will be performed every day at
midnight.
Which steps would you follow? Note: There are 3 correct answers to this question.
Show answerHide answer
Correct answer: A, B, ERegister the JobPerformable bean in your extension's Spring configuration file.Define the Cronjob logic in a class that implements the JobPerformable interface.Create a CronJob item and a trigger for midnight using ImpEx or Backoffice.
Explanation
Explanation:
Creating an automated task in SAP Commerce Cloud follows a standard pattern involving the implementation of logic, the registration of that logic within the application context, and the scheduling of the execution.
B (Define logic): The core of any CronJob is the logic. You must create a Java class that implements the JobPerformable interface (typically by extending AbstractJobPerformable). This class contains the perform(CronJobModel) method where your automated task resides.
A (Register Spring bean): Once the Java class is written, the ServiceLayer needs to know it exists. You register it as a bean in your resources/myextension-spring.xml file. By setting the parent="abstractJobPerformable", you inherit the necessary services (like modelService) to handle the job execution.
E (Create Item and Trigger): The Java logic (the "Job") and the scheduling (the "CronJob") are separate. You must create a CronJob item that points to your ServicelayerJob (defined by your Spring bean ID). To make it run at midnight, you must also create a Trigger item associated with that CronJob, using a cron expression like 0 0 0 * * ?.
Why Other Options are Incorrect
Option C & D: While you often use ImpEx to create the CronJob and Trigger items, you do not need to perform a system update for "essential" or "sample" data to make a CronJob work. System updates are for initializing types or loading factory data; CronJobs are typically operational configurations that can be imported via the HAC (Hybris Administration Console) or created manually in the Backoffice at any time without a system-wide update.
References
SAP Help Portal: The CronJob Service – Detailed guide on implementing JobPerformable and configuring triggers.
Question 13Choose 2
When using Monitoring Support in the Integration API Module, what should you pay
attention to?
Note: There are 2 correct answers to this question.
Show answerHide answer
Correct answer: B, CIn Outbound monitoring, if the source of the OutboundRequest is not from outbound
sync or
webhooks, it is set as UNKNOWN.If you want to disable the monitoring, you need to change the dedicated properties in
local.properties and restart the commerce cloud server.
Explanation
Explanation:
The Monitoring Support in the Integration API module is essential for tracking data exchange between SAP Commerce Cloud and external systems. However, its behavior and configuration have specific constraints.
B (Outbound Source Identification): The system is designed to categorize the origin of outbound traffic. If an OutboundRequest is triggered by a custom service or a mechanism other than the standard Outbound Sync or Webhooks, the monitoring log cannot automatically determine the source and defaults to the value UNKNOWN.
C (Persistence of Configuration): Monitoring is controlled via specific properties (e.g., integrationbackoffice.monitoring.enabled). Because these settings affect how the Integration API interceptors and Spring beans behave, a change in local.properties requires a restart of the SAP Commerce Cloud server to take effect and ensure the monitoring hooks are correctly initialized or detached.
Why Other Options are Incorrect
Option A: You cannot monitor requests using the Meta API. The Meta API is used to retrieve the schema and structure of Integration Objects (the "metadata"), whereas monitoring is performed through the Integration UI Tool in the Backoffice or via specific monitoring OData endpoints.
Option D: If a bulk request exceeds the allowed batch limit, the system typically rejects the request before it reaches the monitoring persistence layer, or it fails to process the payload entirely. Monitoring records individual requests; if the entire request is malformed or violates "Bulk" constraints, it doesn't simply record "one request with the payload" as a successful monitoring entry.
References
SAP Help Portal: Integration API Monitoring – Details on property configuration and outbound request source tracking.
Question 14Choose 2
What should you pay attention to when you are working with webhook?
Show answerHide answer
Correct answer: A, CA webhook requires an integration object as notification payload and consumed
destination as the webhook…A webhook can be configured to send notifications when an item is created, updated or
deleted.
Explanation
Explanation:
Option A is correct because a webhook configuration in SAP Commerce requires two essential parts: an Integration Object that defines the notification payload and a Consumed Destination that specifies the webhook subscriber URL . The Integration Object can be either a standard Integration Object or a POJO Integration Object that models outbound business events .
Option C is correct because webhooks are designed to send notifications to configured URLs when an item is saved—this includes create, update, and delete operations . The notifications are triggered by After Save Events in SAP Commerce .
Why Other Options Are Incorrect:
Option B is incorrect because while webhooks do support filtering, the $filter attribute is used in API requests to select a subset of items when viewing webhook configurations, not to control which consumed destination receives notifications . Filtering for webhook notifications themselves is handled through separate filter scripts, not through a filter attribute on the webhook configuration .
Option D is incorrect because webhooks do not guarantee At Least Once (ALO) delivery, and concurrent events are not completely managed—this level of delivery guarantee is not part of the webhook specification in SAP Commerce.
References:
SAP Help Portal: Webhook Configuration documentation
SAP Community: Creating Webhooks with POJO Integration Objects
Question 15Choose 2
How are relations modeled in the database? Note: There are 2 correct answers to this
question.
Show answerHide answer
Correct answer: C, DOne-to-many relations are stored in a column.Many-to-many relations are deployed as a table.
Question 16Choose 1
You need to create a new custom promotion based on customer reviews for a product. You
create
a customPromotion extension with a new Rule Aware Object to keep customer reviews. In
which
file will you define this new Rule Aware Object?
Show answerHide answer
Correct answer: CIn the customPromotion-beans.xml file
Question 17Choose 1
When are consignments created for an order in the default order management
implementation?
Show answerHide answer
Correct answer: DAfter the order is placed and after it has been sourced successfully
Question 18Choose 2
How can you create asynchronous events in the SAP Commerce Cloud platform? Note:
There are 2
correct answers to this question.
Show answerHide answer
Correct answer: A, DImplement the ClusterAwareEvent interface.Change the platformClusterEventSender Spring bean configuration.
Question 19Choose 3
When you are defining properties in manifest.json, which of the following attributes are you
allowed to use? Note: There are 3 correct answers to this question.
Show answerHide answer
Correct answer: A, D, Evaluekeypersona
Question 20Choose 2
In Integration API Module, which of the following API verbs are controlled by access rights?
Note:
There are 2 correct answers to this question.
Show answerHide answer
Correct answer: B, DCreate - POSTUpdate - POST, PATCH
Full mock exam
Sit the P_C4H340_34 exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real P_C4H340_34 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.