ICommitLeadToSFCommandHandler.Handle

// Job ID: #1343787
using AG.A1.Scheduler.Project.Contracts.Contracts;

var commitLeadToSFCommandHandler = Activate<ICommitLeadToSFCommandHandler>();
await commitLeadToSFCommandHandler.Handle(
    FromJson<CommitLeadToSFRequest>("{\"RavingFanId\":45353,\"LastName\":\"Ghaderi\",\"FirstName\":\"Susan\",\"Title\":null,\"Company\":\"A & S Engineering Inc\",\"Street\":\"28405 Sand Canyon Rd B\",\"City\":\"Santa Clarita\",\"State\":\"CA\",\"PostalCode\":\"91387\",\"Country\":\"United States\",\"Phone\":\"8188423644\",\"Email\":\"ghaderirealty@gmail.com\",\"Website\":null,\"LeadSource\":\"Employee Referral\",\"Fiscal_Year_End__c\":null,\"Entity_Type__c\":\"Schedule C\",\"Source_Email__c\":\"Prakash.Azmira@alliantgroup.com\",\"Source_Name__c\":\"Prakash Azmira\",\"CPA_Email__c\":\"dmichel@valleyalarm.com\",\"CPA_Firm__c\":\"Barkin Perren Schwager & Dolan LLP\",\"CPA_Name__c\":\"Dave Michel\",\"CPA_Phone__c\":\"8182851500\",\"Service_Lines_Interested_In__c\":\"Internal IT Service Desk\",\"Existing_Client_Project_Manager__c\":\"Seth Beard\",\"Primary_Service_Line__c\":\"Internal IT Service Desk\",\"ASL__c\":true,\"Mattersphere_Referral_ID__c\":\"45353\",\"Matter_Number__c\":null,\"PM_ID__c\":\"6239\",\"CR_ID__c\":null,\"Submitted_By_ID__c\":7723,\"Submitted_By_Title__c\":null,\"Sub_Team_ID__c\":null,\"Team_ID__c\":null,\"CPA_Contact_Title__c\":\"President\",\"Additional_Notes__c\":\"Test\",\"Referring_Client_Consent__c\":\"Yes\",\"Existing_Client_Project_Number__c\":\"302464.0009\",\"Referred_By_Company__c\":\"A & S Engineering Inc\",\"Referred_By_Contact__c\":\"Susan Ghaderi\",\"Referred_By_Title__c\":null,\"Referred_By_Contact_Phone__c\":\"8188423644\",\"Referred_By_Contact_Email__c\":\"ghaderirealty@gmail.com\",\"Current_Service_Lines__c\":\"R&D\",\"Existing_Client_Team_Director__c\":\"Cullen Brungs\"}"),
    null,
    null);

Parameters

CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

4/7/2026 10:19:26 AM (+1.790s) Failed

An exception occurred during performance of the job.

Newtonsoft.Json.JsonSerializationException

Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'AG.Integrations.RESTClients.SalesforceREST.Models.Lead' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path '', line 1, position 1.

Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'AG.Integrations.RESTClients.SalesforceREST.Models.Lead' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.
   at AG.A1.Framework.Rest.RESTClient.HandleResponse[T](RestResponse restResponse) in C:\agent\_work\1\s\A1Solution\src-framework\AG.A1.Framework\Rest\RESTClient.cs:line 389
   at AG.A1.Framework.Rest.RESTClient.ExecutePOSTAsync[T](IRESTEndpoint apiEndpoint, IDictionary`2 headers, IDictionary`2 bodyParameters, IDictionary`2 urlParameters) in C:\agent\_work\1\s\A1Solution\src-framework\AG.A1.Framework\Rest\RESTClient.cs:line 273
   at AG.Integrations.RESTClients.SalesforceREST.SalesforceApiClientController.CreateLead(IDictionary`2 param, SalesforceToken token) in C:\agent\_work\1\s\A1Solution\src-integrations\AG.Integrations.RESTClients\SalesforceREST\SalesforceApiClientController.cs:line 295
   at AG.A1.Scheduler.Project.Application.Helpers.SalesforceHelper.CreateLead(Lead lead, Boolean bypassTokenValidation) in C:\agent\_work\1\s\A1Solution\src-schedulers\AG.A1.Scheduler.Project.Application\Helpers\SalesforceHelper.cs:line 125
   at AG.A1.Scheduler.Project.Application.Features.RavingFanReferralToSF.Commands.CommitLeadToSFCommandHandler.Handle(CommitLeadToSFRequest request, CancellationToken cancellationToken, PerformContext performContext) in C:\agent\_work\1\s\A1Solution\src-schedulers\AG.A1.Scheduler.Project.Application\Features\LeadToSF\Commands\CommitLeadToSFCommandHandler.cs:line 38
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

+20ms Processing

Server:
dw1sdwk000ffj:2172
Worker:
34ff146b
+34msSubmission to Salesforce - Started at 4/7/2026 10:19:24 AM
+42msSubmitting for RavingFan Record Id: 45353
+1.750sCannot deserialize the current JSON array (e.g. [1,2,3]) into type 'AG.Integrations.RESTClients.SalesforceREST.Models.Lead' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path '', line 1, position 1.

+20ms Enqueued

4/7/2026 10:19:24 AM Created