你的解决方案是正确的。您可以使用 Infusionsoft SDK 轻松完成此操作。这是 C# SDK 创建联系人(潜在客户)的代码。
const string application = "ab123";
const string apiKey = "<API Key>";
var customer = new Customer(application, apiKey);
var client = customer.Connect();
client.MethodListener = new ConsoleMethodListener();
client.ContactService.Add(setter =>
{
setter.Set(c => c.FirstName, "FirstName1");
setter.Set(c => c.LastName, "LastName1");
setter.Set(c => c.Company, "FirstCompany");
setter.Set(c => c.Email, "firstlast1@xyz.com");
setter.Set(c => c.Leadsource, "Website");
setter.Set(c => c.Phone1, "0405879856");
});