Closed aliw77 closed 8 years ago
Try doing:
client.update_lead(lead.id, 'custom.field name' => "field value")
You should be able to create leads by doing something like:
client.create_lead(
name: "Bluth Company",
contacts: [{
name: "Buster Bluth",
emails: [{type: "office", email: "cartographer@bluthcompany.com"}]
}],
custom: {
"Custom Car Type" => "Stair Car",
car_color: "red, white and blue"
}
)
Make sense?
works like a charm! thanks.
Taylor - thank you for creating this very helpful gem and opensourcing it. I had a question about updating custom fields for an existing field, and creating a lead with custom fields. I have tried the following and it didn't work:
puts client.update_lead(lead.id, '{"custom.XXX": "Yes"}')
I see a Hashie::Mash object returned which is the lead but the custom field does not seem to be updating. I tried it without the single quotes, as a JSON but same results, no update to the custom field and same Hashie::Mash object returnedAny thoughts on how to do this?
Also, is there a way to create custom fields during lead creation?
thanks again!