Re: Issue creating custom combination remarketing list using LogicalUserList

2015-11-18 Thread kaushik vinay T G
Hello Mike,
   
   I tried that before and gave it a try again now, this is what i got as 
response

   AdsCommon::Errors::TypeMismatchError: 
AdsCommon::Errors::TypeMismatchError: expected: 'choice subtype', provided: 
'ExpressionRuleUserList' for field '{:id=>185402532}'
  

On Wednesday, 18 November 2015 10:57:33 UTC-5, Michael Cloonan (AdWords API 
Team) wrote:
>
> Hello,
>
> You shouldn't need to define :user_list => within the array of 
> :rule_operands. Instead, just define the user list directly. This is what 
> "choice" type means; you can populate the data with one of many possible 
> classes. This is why an explicit :xsi_type is required, as well. So, for 
> example, rather than the way you have :rules populated above, try this:
>
> :rules => [
>   {
> :operator => 'ANY',
> :rule_operands => [
>   {
> :xsi_type => "ExpressionRuleUserList",
> :id => 185402532
>   },
>   {
> :xsi_type => "ExpressionRuleUserList",
> :id => 185402652
>   },
>   {
> :xsi_type => "ExpressionRuleUserList",
>     :id => 185402772
>   }
> ]
>   }
> ]
>
> Regards,
> Mike, AdWords API Team
>
> On Wednesday, November 18, 2015 at 9:26:22 AM UTC-5, kaushik vinay T G 
> wrote:
>>
>> Hi Nadine,
>>
>>I tried to send the parameters as u mentioned, but Im unable to create 
>> it using ruby client library, please let me know if im passing the right 
>> syntax
>>
>>user_list_srv = adwords.service(:AdwordsUserListService, :v201509)
>>operation = {
>>   :operator => 'ADD',
>>   :operand => {
>> :xsi_type => 'LogicalUserList',
>> :name => "Retargeting list",
>> :description => "Custom combination list",
>> :status => 'OPEN',
>> :membership_life_span => '30',
>> :rules => [
>>   {
>> :operator => 'ANY',
>> :rule_operands => [
>>   {
>> :user_list => {
>>   :xsi_type => "ExpressionRuleUserList",
>>   :id => 185402532
>> }
>>   },
>>   {
>> :user_list => {
>>   :xsi_type => "ExpressionRuleUserList",
>>   :id => 185402652
>> }
>>   },
>>   {
>> :user_list => {
>>   :xsi_type => "ExpressionRuleUserList",
>>   :id => 185402772
>> }
>>   }
>> ]
>>   }
>> ]
>>   }
>> }
>>response = user_list_srv.mutate([operation])
>>
>>
>> Result:
>> AdsCommon::Errors::TypeMismatchError: 
>> AdsCommon::Errors::TypeMismatchError: expected: 'choice subtype', provided: 
>> '' for field '{:user_list=>{:xsi_type=>"ExpressionRuleUserList", 
>> :id=>185402532}}'
>>
>>
>> On Tuesday, 17 November 2015 16:38:35 UTC-5, Nadine Sundquist (AdWords 
>> API Team) wrote:
>>>
>>> Hello,
>>>
>>> I gave this a try myself using the example, while keeping in mind what 
>>> you wanted to do. This is the request and response in SOAP XML (minus the 
>>> header):
>>>
>>> [17 Nov 2015 16:26:44,075 - INFO ] Outgoing Request:
>>> >> xmlns="https://adwords.google.com/api/adwords/rm/v201509;>>>  
>>> xmlns="https://adwords.google.com/api/adwords/cm/v201509;>ADD>>  
>>> xsi:type="LogicalUserList" >My combination list customers 
>>> #2gQCmMULSkgHdANY>> xsi:type="BasicUserList" 
>>> >66612533>> xsi:type="BasicUserList" 
>>> >66612413>> xsi:type="BasicUserList" 
>>> >66612293
>>> [17 Nov 2015 16:26:44,540 - INFO ] Incoming response:
>>> https://adwords.google.com/api/adwords/cm/v201509; xmlns:ns2="
>>> https://adwords.google.com/api/adwords/rm/v201509;>UserListReturnValue>>  
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
>>> xsi:type="ns2:LogicalUserList">66612653falseMy
>>>  
>>> combination list customers 

Re: Issue creating custom combination remarketing list using LogicalUserList

2015-11-18 Thread kaushik vinay T G
Hi,
   I was only able to pass :xsi_type as "UserList", anything other than 
that throws an error

user_list_srv = adwords.service(:AdwordsUserListService,  :v201509)
operation = {
  :operator => 'ADD',
  :operand => {
:xsi_type => 'LogicalUserList',
:name => "Retargeting list",
:description => "Custom combination list",
:status => 'OPEN',
:membership_life_span => '30',
:rules => [
  {
:operator => 'ANY',
:rule_operands => [
  {
:xsi_type => "ExpressionRuleUserList",
:id => 185402532
  },
  {
:xsi_type => "ExpressionRuleUserList",
:id => 185402652
  },
  {
:xsi_type => "ExpressionRuleUserList",
:id => 185402772
  }
]
  }
]
  }
}
response = user_list_srv.mutate([operation])



On Wednesday, 18 November 2015 12:51:52 UTC-5, Michael Cloonan (AdWords API 
Team) wrote:
>
> Hello,
>
> In your initial email, you mentioned that the library validation worked 
> and that you got a response from the API. Try that same syntax, but using 
> the specific :xsi_type (ExpressionRuleUserList) rather than the generic 
> "UserList". If that's already what you've tried, please provide the exact 
> code you're using, with those changes in place, so that I can try 
> troubleshooting further.
>
> Regards,
> Mike, AdWords API Team
>
> On Wednesday, November 18, 2015 at 11:12:01 AM UTC-5, kaushik vinay T G 
> wrote:
>>
>> Hello Mike,
>>
>>I tried that before and gave it a try again now, this is what i got as 
>> response
>>
>>AdsCommon::Errors::TypeMismatchError: 
>> AdsCommon::Errors::TypeMismatchError: expected: 'choice subtype', provided: 
>> 'ExpressionRuleUserList' for field '{:id=>185402532}'
>>   
>>
>> On Wednesday, 18 November 2015 10:57:33 UTC-5, Michael Cloonan (AdWords 
>> API Team) wrote:
>>>
>>> Hello,
>>>
>>> You shouldn't need to define :user_list => within the array of 
>>> :rule_operands. Instead, just define the user list directly. This is what 
>>> "choice" type means; you can populate the data with one of many possible 
>>> classes. This is why an explicit :xsi_type is required, as well. So, for 
>>> example, rather than the way you have :rules populated above, try this:
>>>
>>> :rules => [
>>>   {
>>> :operator => 'ANY',
>>> :rule_operands => [
>>>   {
>>> :xsi_type => "ExpressionRuleUserList",
>>> :id => 185402532
>>>   },
>>>   {
>>> :xsi_type => "ExpressionRuleUserList",
>>> :id => 185402652
>>>   },
>>>   {
>>> :xsi_type => "ExpressionRuleUserList",
>>> :id => 185402772
>>>   }
>>> ]
>>>   }
>>> ]
>>>
>>> Regards,
>>> Mike, AdWords API Team
>>>
>>> On Wednesday, November 18, 2015 at 9:26:22 AM UTC-5, kaushik vinay T G 
>>> wrote:
>>>>
>>>> Hi Nadine,
>>>>
>>>>I tried to send the parameters as u mentioned, but Im unable to 
>>>> create it using ruby client library, please let me know if im passing the 
>>>> right syntax
>>>>
>>>>user_list_srv = adwords.service(:AdwordsUserListService, :v201509)
>>>>operation = {
>>>>   :operator => 'ADD',
>>>>   :operand => {
>>>> :xsi_type => 'LogicalUserList',
>>>> :name => "Retargeting list",
>>>> :description => "Custom combination list",
>>>> :status => 'OPEN',
>>>> :membership_life_span => '30',
>>>> :rules => [
>>>>   {
>>>> :operator => 'ANY',
>>>> :rule_operands => [
>>>>   {
>>>> :user_list => {
>>>>   :xsi_type => "ExpressionRuleUserList",
>>>>   :id => 185402532
>>>>  

Re: Issue creating custom combination remarketing list using LogicalUserList

2015-11-18 Thread kaushik vinay T G
Hello Mike,

Thanks for the update, had my head cracking on this, will file for an 
issue now.

Regards,
Kaushik Vinay 

On Wednesday, 18 November 2015 13:37:41 UTC-5, Michael Cloonan (AdWords API 
Team) wrote:
>
> Hello,
>
> Looking at the WSDL, I believe that hash is supposed to work. We only 
> recently added choice support for requests to the ruby library, but only 
> tested it for a different use case, not LogicalUserLists. I believe this to 
> be a bug with the ruby library itself.
>
> Can you please file an issue here: 
> https://github.com/googleads/google-api-ads-ruby/issues
>
> Thanks,
> -Mike, AdWords API Team
>
> On Wednesday, November 18, 2015 at 1:32:41 PM UTC-5, kaushik vinay T G 
> wrote:
>>
>> Hi,
>>I was only able to pass :xsi_type as "UserList", anything other than 
>> that throws an error
>>
>> user_list_srv = adwords.service(:AdwordsUserListService,  :v201509)
>> operation = {
>>   :operator => 'ADD',
>>   :operand => {
>> :xsi_type => 'LogicalUserList',
>> :name => "Retargeting list",
>> :description => "Custom combination list",
>> :status => 'OPEN',
>> :membership_life_span => '30',
>> :rules => [
>>   {
>> :operator => 'ANY',
>> :rule_operands => [
>>   {
>> :xsi_type => "ExpressionRuleUserList",
>> :id => 185402532
>>   },
>>   {
>> :xsi_type => "ExpressionRuleUserList",
>> :id => 185402652
>>   },
>>   {
>> :xsi_type => "ExpressionRuleUserList",
>> :id => 185402772
>>   }
>> ]
>>   }
>> ]
>>   }
>> }
>> response = user_list_srv.mutate([operation])
>>
>>
>>
>> On Wednesday, 18 November 2015 12:51:52 UTC-5, Michael Cloonan (AdWords 
>> API Team) wrote:
>>>
>>> Hello,
>>>
>>> In your initial email, you mentioned that the library validation worked 
>>> and that you got a response from the API. Try that same syntax, but using 
>>> the specific :xsi_type (ExpressionRuleUserList) rather than the generic 
>>> "UserList". If that's already what you've tried, please provide the exact 
>>> code you're using, with those changes in place, so that I can try 
>>> troubleshooting further.
>>>
>>> Regards,
>>> Mike, AdWords API Team
>>>
>>> On Wednesday, November 18, 2015 at 11:12:01 AM UTC-5, kaushik vinay T G 
>>> wrote:
>>>>
>>>> Hello Mike,
>>>>
>>>>I tried that before and gave it a try again now, this is what i got 
>>>> as response
>>>>
>>>>AdsCommon::Errors::TypeMismatchError: 
>>>> AdsCommon::Errors::TypeMismatchError: expected: 'choice subtype', 
>>>> provided: 
>>>> 'ExpressionRuleUserList' for field '{:id=>185402532}'
>>>>   
>>>>
>>>> On Wednesday, 18 November 2015 10:57:33 UTC-5, Michael Cloonan (AdWords 
>>>> API Team) wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> You shouldn't need to define :user_list => within the array of 
>>>>> :rule_operands. Instead, just define the user list directly. This is what 
>>>>> "choice" type means; you can populate the data with one of many possible 
>>>>> classes. This is why an explicit :xsi_type is required, as well. So, for 
>>>>> example, rather than the way you have :rules populated above, try this:
>>>>>
>>>>> :rules => [
>>>>>   {
>>>>> :operator => 'ANY',
>>>>> :rule_operands => [
>>>>>   {
>>>>> :xsi_type => "ExpressionRuleUserList",
>>>>> :id => 185402532
>>>>>   },
>>>>>   {
>>>>> :xsi_type => "ExpressionRuleUserList",
>>>>> :id => 185402652
>>>>>   },
>>>>>   {
>>>>> :xsi_type => "ExpressionRuleUserList",
>>>>> :id => 18540

Re: Issue creating custom combination remarketing list using LogicalUserList

2015-11-18 Thread kaushik vinay T G
Hi Nadine,

   I tried to send the parameters as u mentioned, but Im unable to create 
it using ruby client library, please let me know if im passing the right 
syntax

   user_list_srv = adwords.service(:AdwordsUserListService, :v201509)
   operation = {
  :operator => 'ADD',
  :operand => {
:xsi_type => 'LogicalUserList',
:name => "Retargeting list",
:description => "Custom combination list",
:status => 'OPEN',
:membership_life_span => '30',
:rules => [
  {
:operator => 'ANY',
:rule_operands => [
  {
:user_list => {
  :xsi_type => "ExpressionRuleUserList",
  :id => 185402532
}
  },
  {
:user_list => {
  :xsi_type => "ExpressionRuleUserList",
  :id => 185402652
}
  },
  {
:user_list => {
  :xsi_type => "ExpressionRuleUserList",
  :id => 185402772
}
  }
]
  }
]
  }
}
   response = user_list_srv.mutate([operation])


Result:
AdsCommon::Errors::TypeMismatchError: AdsCommon::Errors::TypeMismatchError: 
expected: 'choice subtype', provided: '' for field 
'{:user_list=>{:xsi_type=>"ExpressionRuleUserList", :id=>185402532}}'


On Tuesday, 17 November 2015 16:38:35 UTC-5, Nadine Sundquist (AdWords API 
Team) wrote:
>
> Hello,
>
> I gave this a try myself using the example, while keeping in mind what you 
> wanted to do. This is the request and response in SOAP XML (minus the 
> header):
>
> [17 Nov 2015 16:26:44,075 - INFO ] Outgoing Request:
>  xmlns="https://adwords.google.com/api/adwords/rm/v201509;>  
> xmlns="https://adwords.google.com/api/adwords/cm/v201509;>ADD  
> xsi:type="LogicalUserList" >My combination list customers 
> #2gQCmMULSkgHdANY xsi:type="BasicUserList" 
> >66612533 xsi:type="BasicUserList" 
> >66612413 xsi:type="BasicUserList" 
> >66612293
> [17 Nov 2015 16:26:44,540 - INFO ] Incoming response:
> https://adwords.google.com/api/adwords/cm/v201509; xmlns:ns2="
> https://adwords.google.com/api/adwords/rm/v201509;>UserListReturnValue  
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
> xsi:type="ns2:LogicalUserList">66612653falseMy
>  
> combination list customers 
> #2gQCmMULSkgHdOPENOWNEDACTIVE30LOGICALtrueLogicalUserListANY  
> xsi:type="ns2:BasicUserList">66612533truelist
>  
> #1mXn1x3VePnQ6REMARKETINGBasicUserList  
> xsi:type="ns2:BasicUserList">66612413truelist
>  
> #1mlcbZAtdOeBkREMARKETINGBasicUserList  
> xsi:type="ns2:BasicUserList">66612293truelist
>  
> #1mGOdnV3oZrZUREMARKETINGBasicUserList
>
> The one difference I see between the two is that I'm specifying a specific 
> kind of list rather than a UserList. Please take a look at this request, an 
> give it a try in your own code. Just as a quick note, certain types of user 
> lists cannot be combined with other types of user lists. For example, CRM 
> based user lists cannot be combined with other types of user lists. I'm 
> just mentioning this because based on your request, I can't tell what kinds 
> of lists you're using. Hopefully, that will help as well.
>
> Regards,
> Nadine, AdWords API Team
>
> On Tuesday, November 17, 2015 at 12:31:29 AM UTC-5, kaushik vinay T G 
> wrote:
>>
>> Hi Nadine,
>>
>>Yes, the example shown for "Combining multiple user lists" on that 
>> page.
>> Thanks.
>>
>> On Monday, 16 November 2015 18:10:38 UTC-5, Nadine Sundquist (AdWords API 
>> Team) wrote:
>>>
>>> Hi,
>>>
>>> In order to make sure I reproduce this correctly, is this example 
>>> <https://developers.google.com/adwords/api/docs/guides/remarketing#combining-multiple-user-lists>
>>>  
>>> the one that you were following when creating your request?
>>>
>>> Best,
>>> Nadine, AdWords API Team
>>>
>>> On Monday, November 16, 2015 at 8:50:40 AM UTC-5, kaushik vinay T G 
>>> wrote:
>>>>
>>>>
>>>> Hello,
>>>>
>>>>   We are using Ruby client library for the AdWords API, currently 
>>>> having issues creating custom combination of existing remarketing list 
>&

Issue creating custom combination remarketing list using LogicalUserList

2015-11-16 Thread kaushik vinay T G

Hello,
   
  We are using Ruby client library for the AdWords API, currently having 
issues creating custom combination of existing remarketing list using 
LogicalUserList.
  Passing multiple Userlist as an array inside rule_operands seems to set 
only one of Userlist in the result.
  My problem is similar to this question previous asked by someone v201502 
version can't set retargeting audience. 

  Please advise on how to pass the parameters in respect to code below. 

  Thanks.

  Code:

  user_list_srv = adwords.service(:AdwordsUserListService, :v201509)
  operation = {
:operator => 'ADD',
:operand => {
  :xsi_type => 'LogicalUserList',
  :name => "Retargeting list",
  :description => "Custom combination list",
  :status => 'OPEN',
  :membership_life_span => '30',
  :rules => [
{
  :operator => 'ANY',
  :rule_operands => [
{
  :xsi_type=>"UserList",
  :id => 185402234
},
{
  :xsi_type=>"UserList",
  :id => 185402123
},
{
  :xsi_type=>"UserList",
  :id => 185402755
}
  ]
}
  ]
}
  }
 response = user_list_srv.mutate([operation])

 result:

{:list_return_value_type=>"UserListReturnValue", 
:value=>[{:id=>"18566", :is_read_only=>"false", :name=>"Retargeting 
list", :description=>"Custom combination list", :status=>"OPEN", 
:integration_code=>nil, :access_reason=>"OWNED", 
:account_user_list_status=>"ACTIVE", :membership_life_span=>"30", 
:list_type=>"LOGICAL", :is_eligible_for_search=>"true", 
:user_list_type=>"LogicalUserList", :rules=>{:operator=>"ANY", 
:rule_operands=>{:user_list=>{:id=>"185402755", :is_read_only=>"true", 
:name=>"Retargeting - Commercial Sales Specialist", 
:list_type=>"RULE_BASED", :user_list_type=>"ExpressionRuleUserList", 
:rule=>{:groups=>{:items=>{:string_rule_item=>{:key=>{:name=>"url__"}, 
:op=>"CONTAINS", :value=>"commercial-sales-specialist", 
:"@xsi:type"=>"ns2:ExpressionRuleUserList"}}}, 
:xsi_type=>"ns2:LogicalUserList"}]} 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e09bfa23-5b78-4035-85e0-28bd29161193%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue creating custom combination remarketing list using LogicalUserList

2015-11-16 Thread kaushik vinay T G
Hi Nadine,

   Yes, the example shown for "Combining multiple user lists" on that page.
Thanks.

On Monday, 16 November 2015 18:10:38 UTC-5, Nadine Sundquist (AdWords API 
Team) wrote:
>
> Hi,
>
> In order to make sure I reproduce this correctly, is this example 
> <https://developers.google.com/adwords/api/docs/guides/remarketing#combining-multiple-user-lists>
>  
> the one that you were following when creating your request?
>
> Best,
> Nadine, AdWords API Team
>
> On Monday, November 16, 2015 at 8:50:40 AM UTC-5, kaushik vinay T G wrote:
>>
>>
>> Hello,
>>
>>   We are using Ruby client library for the AdWords API, currently having 
>> issues creating custom combination of existing remarketing list using 
>> LogicalUserList.
>>   Passing multiple Userlist as an array inside rule_operands seems to set 
>> only one of Userlist in the result.
>>   My problem is similar to this question previous asked by someone v201502 
>> version can't set retargeting audience. 
>> <https://groups.google.com/forum/#!searchin/adwords-api/LogicalUserList/adwords-api/odAyeDFBxKw/yX3HvNmlSYUJ>
>>   Please advise on how to pass the parameters in respect to code below. 
>>
>>   Thanks.
>>
>>   Code:
>>
>>   user_list_srv = adwords.service(:AdwordsUserListService, :v201509)
>>   operation = {
>> :operator => 'ADD',
>> :operand => {
>>   :xsi_type => 'LogicalUserList',
>>   :name => "Retargeting list",
>>   :description => "Custom combination list",
>>   :status => 'OPEN',
>>   :membership_life_span => '30',
>>   :rules => [
>> {
>>   :operator => 'ANY',
>>   :rule_operands => [
>> {
>>   :xsi_type=>"UserList",
>>   :id => 185402234
>> },
>> {
>>   :xsi_type=>"UserList",
>>   :id => 185402123
>> },
>> {
>>   :xsi_type=>"UserList",
>>   :id => 185402755
>> }
>>   ]
>> }
>>   ]
>> }
>>   }
>>  response = user_list_srv.mutate([operation])
>>
>>  result:
>>
>> {:list_return_value_type=>"UserListReturnValue", 
>> :value=>[{:id=>"18566", :is_read_only=>"false", :name=>"Retargeting 
>> list", :description=>"Custom combination list", :status=>"OPEN", 
>> :integration_code=>nil, :access_reason=>"OWNED", 
>> :account_user_list_status=>"ACTIVE", :membership_life_span=>"30", 
>> :list_type=>"LOGICAL", :is_eligible_for_search=>"true", 
>> :user_list_type=>"LogicalUserList", :rules=>{:operator=>"ANY", 
>> :rule_operands=>{:user_list=>{:id=>"185402755", :is_read_only=>"true", 
>> :name=>"Retargeting - Commercial Sales Specialist", 
>> :list_type=>"RULE_BASED", :user_list_type=>"ExpressionRuleUserList", 
>> :rule=>{:groups=>{:items=>{:string_rule_item=>{:key=>{:name=>"url__"}, 
>> :op=>"CONTAINS", :value=>"commercial-sales-specialist", 
>> :"@xsi:type"=>"ns2:ExpressionRuleUserList"}}}, 
>> :xsi_type=>"ns2:LogicalUserList"}]} 
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/61a09557-77a5-4fd1-94ad-7277ae83fd76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.