i started to use the Marketing Cloud recently but i'm facing some problems to update a Preference Attribute using the FuelSDK (ruby). So, basically i can just update the profile attribute seding the content through the API (sending the desired field on the Attributes tag during the SOAP request), but i can't do the same strategy to update a Preference Attribute.

Currently, i'm interesting to set some values (Profile and Preferences attributes) when i create a subscriber triggering a first email for the user (when the user create a new account) through the Triggered Email action.

I don't really know how i can update a Preference Attribute using the FuelSdk.

If someone could give some tips, i would appreciate it.


  • What happens when you try to create a subscriber(code.exacttarget.com/apis-sdks/fuel-sdks/subscribers/…) while including preference attributes? – Drew Simmons Feb 13 '15 at 15:26
  • @DrewSimmons nothing happens. I have a Preference Attribute called HasAccount that i'm interesting to update when i create a subscriber. You can see the field in that image dropbox.com/s/4oal6erdjy90jwp/… – Rodolfo Arruda Feb 17 '15 at 20:04
  • Have you tried treating preference attributes as other properties? Something like this?: require 'fuelsdk' myClient = FuelSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }} subscriber = FuelSDK::Subscriber.new subscriber.authStub = myclient subscriber.props = {.., ..., ..., "Has Account" => true} results = subscriber.post p results – Drew Simmons Feb 17 '15 at 22:28

Preference Attribute updates work fine for me:

def set_preference(emaiL_address, preference_name, new_value)
  new_subscriber = FuelSDK::Subscriber.new
  new_subscriber.authStub = @auth
  new_subscriber.props = {
    "EmailAddress" => emaiL_address,
    "Attributes" => [ { 'Name' => preference_name, 'Value' => new_value } ]
  results = new_subscriber.patch
  puts "Setting: #{emaiL_address} set property #{preference_name} => #{new_value}, code=#{results.code}"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.