Ruby wrapper: adding subscriber w/ custom field

I am using the Ruby wrapper to add subscribers and have everything hooked up in my controller (and working) using:
@cm =
@cm.add_subscriber(list_id,, @user.full_name)

What I want to do is add a custom field to CM (already done) and send the company info when adding a new subscriber.  I can't find any documentation on adding a new subscriber with custom fields, but hope that it is possible.  I tried a few random shots like add_subscriber(list_id,, @user.full_name, but (understandably) got an error.

Any help would be appreciated.  Thank you.

Dave Dave, 8 years ago

Hi, forgive my answer if it's way off, I'm not the resident API guru, but are you definitely using the Subscriber.AddWithCustomFields method instead of just Subscriber.Add?

Let me know if that's not the problem and I'll pass this on to someone who can help you further.

akv2, 8 years ago

Thank you for the response...

I suppose I might be able to use Subscriber.AddWithCustomFields, however I am unaware of how to use that with the Ruby wrapper.  I guess I was hoping for a ruby method so that I don't have to jump through any hoops.  I searched the Campaign Monitor RDocs and have found nothing on any sort of 'add_subscriberwithcustomfields' method.  It may not have been worked in yet, or no documentation on using this Subscriber.AddWithCustomFields method (or I just can't find it).

Again, this is what I have in my controller...

@cm =
@cm.add_subscriber(list_id,, @user.full_name)

Have you successfully used Subscriber.AddWithCustomFields in a ruby controller before?  And if so, was it pretty simple?

akv2, 8 years ago

Is anyone able to help me?

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free