SourceAdapterForRawDataPush

This interface allows your Adapter to be the start of a Push Link that begins with some arbitrary data, in the form of a String.

You will use this interface if your Adapter is processing messages that are being pushed into Salesforce, for example a web hook message. Valence doesn’t understand the contents of the message, and passes it to your source Adapter to break it down into RecordInFlight instances.

Definition

/**
 * Implement this interface if your Adapter can be used to turn raw source data into RecordInFlight records. This means
 * that there is some kind of data you've built your adapter to parse (like JSON in a webhook, say). Implementing this
 * interface will allow us to feed that data to your Adapter. Use this interface if your Adapter is handed data (a Push).
 */
global interface SourceAdapterForRawDataPush extends SourceAdapter {

        /**
         * Given some source data, produce a collection of RecordInFlight records that are ready for further
         * processing by the Valence engine.
         *
         * @param context Information about this Link and the current execution of it.
         * @param rawData Source data as a String; likely holds more than one record.
         *
         * @return The passed source data converted into RecordInFlight records.
         */
        List<RecordInFlight> buildRecords(LinkContext context, String rawData);
}