In this lesson, you'll dive into the crucial processes of preparing customer data for ingestion and implementing ingestion operations using the Ingestion API. This topic is essential for ensuring that your customer data is accurately and efficiently updated in the system. You will learn how to prepare code to harness the power of the Ingestion API, enabling you to seamlessly input customer event data to the SAP Customer Data Platform. We will cover the various endpoints available for ingesting both single and multiple events, using either their dataEventId or externalId.

Preparing Data for Ingestion
Before we can dive into the specifics of ingesting data using the Ingestion API, it's imperative to properly prepare your data for a smooth and error-free ingestion process.
- Organize Data Sources
- Collect all data sources you plan to ingest into the SAP Customer Data Platform. Make sure your data is clean, consistent, and formatted according to the ingestion requirements. This often involves normalizing the format of customer data fields like names, addresses, emails, and phone numbers.
- Validate Data Structure
- Ensure your data corresponds to the expected schema of the target events within the SAP Customer Data Platform to avoid format errors that may arise during ingestion.
- Prepare Business Unit, Customer Schema, Server Application and Events in the SAP Customer Data Platform Console
- To persist the customer data ingested from the events, we need to prepare the business unit and customer schema. The custom attributes we add in the customer schema will be mapped to the attributes on the event model we build for the server application. Let’s assume the server application is created, and the event model is properly mapped to the customer schema.
In SAP Customer Data Platform, each event is identified using either of two unique identifiers: dataEventId or externalId. Ensure that you copy the appropriate identifier of the event you plan to ingest.