ICommitLeadToSFCommandHandler.Handle

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

var commitLeadToSFCommandHandler = Activate<ICommitLeadToSFCommandHandler>();
await commitLeadToSFCommandHandler.Handle(
    FromJson<CommitLeadToSFRequest>("{\"RavingFanId\":43108,\"LastName\":\"Sikander\",\"FirstName\":\"Amin\",\"Title\":\"President\",\"Company\":\"Gaea Global Technologies, Inc.\",\"Street\":\"5201 Great America Pkwy Ste 320\",\"City\":\"Santa Clara\",\"State\":\"CA\",\"PostalCode\":\"95054\",\"Country\":\"United States\",\"Phone\":\"650-740-3049\",\"Email\":\"amin.sikander@gaeaglobal.com\",\"Website\":null,\"LeadSource\":\"Employee Referral\",\"Fiscal_Year_End__c\":null,\"Entity_Type__c\":null,\"Source_Email__c\":\"Victoria.Delsanter@alliantgroup.com\",\"Source_Name__c\":\"Victoria Delsanter\",\"CPA_Email__c\":\"david.lopez@mediacentric.net\",\"CPA_Firm__c\":\"The Giffin Company Cpas\",\"CPA_Name__c\":\"David Lopez\",\"CPA_Phone__c\":\"3103257900ext12101\",\"Service_Lines_Interested_In__c\":\"Client Account Services\",\"Existing_Client_Project_Manager__c\":\"Parth Bhardwaj\",\"Primary_Service_Line__c\":\"Client Account Services\",\"ASL__c\":true,\"Mattersphere_Referral_ID__c\":\"43108\",\"Matter_Number__c\":null,\"PM_ID__c\":\"5227\",\"CR_ID__c\":null,\"Submitted_By_ID__c\":7082,\"Submitted_By_Title__c\":null,\"Sub_Team_ID__c\":null,\"Team_ID__c\":null,\"CPA_Contact_Title__c\":\"President\",\"Additional_Notes__c\":\"Has 6 people in his accounting office – all already based out of india – interested in seeing what additional we can offer – sent one pager and looped in Brad. Scheduling call for next week\",\"Referring_Client_Consent__c\":\"Yes\",\"Existing_Client_Project_Number__c\":\"303043.0003\",\"Referred_By_Company__c\":\"Gaea Global Technologies, Inc.\",\"Referred_By_Contact__c\":\"Amin Sikander\",\"Referred_By_Title__c\":\"President\",\"Referred_By_Contact_Phone__c\":\"650-740-3049\",\"Referred_By_Contact_Email__c\":\"amin.sikander@gaeaglobal.com\",\"Current_Service_Lines__c\":\"ERC\",\"Existing_Client_Team_Director__c\":\"Reid McLaughlin\"}"),
    null,
    null);

Parameters

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

State

3/5/2024 9:25:19 PM (+1.113s) 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 354
   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 251
   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 298
   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 128
   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 67
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

+93ms Processing

Server:
wn1mdwk0000fw:7804
Worker:
490a3d3c

+37ms Enqueued

3/5/2024 9:25:18 PM Created