class Multiwoven::Integrations::Destination::SalesforceConsumerGoodsCloud::Client
def process_records(records, stream)
def process_records(records, stream) write_success = 0 write_failure = 0 properties = stream.json_schema[:properties] log_message_array = [] records.each do |record_object| record = extract_data(record_object, properties) args = [stream.name, "Id", record] response = send_data_to_salesforce(args) write_success += 1 log_message_array << log_request_response("info", args, response) rescue StandardError => e # TODO: add sync_id and sync run id to the logs handle_exception(e, { context: "SALESFORCE:CONSUMER:GOODS:ClOUD:WRITE:EXCEPTION", type: "error", sync_id: @sync_config.sync_id, sync_run_id: @sync_config.sync_run_id }) write_failure += 1 log_message_array << log_request_response("error", args, e.message) end tracking_message(write_success, write_failure, log_message_array) end