How would you approach a Data Mapper Load that must create a parent record and several children atomically?
Suggested answer
The interesting part is the relationship and what happens when one part fails.
1. Define the parent object first in the Load definition, then define the child, and link the child's lookup field to the parent step. The runtime resolves the newly created parent Id and stamps it on each child.
2. Map the child data from an array node in the input JSON — typically the node produced by a repeatable Block in the OmniScript — so a variable number of children is handled without changing the definition.
3. For atomicity, be clear about what the platform guarantees. If a partial failure would leave an orphaned parent, wrap the call in an Integration Procedure with a Try-Catch Block so you can respond deliberately rather than surfacing a raw error, and consider whether compensating cleanup is required.
4. Use upsert with an external Id where the operation may be retried, so a resubmission updates rather than duplicating.
5. Test with the actual running user's permissions, not an administrator's. Loads respect the caller's object and field access, and a Load that works for you can silently write fewer fields for someone else.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.