Location Extension using FEEDS

57 views
Skip to first unread message

AMAP TEST

unread,
Mar 30, 2022, 12:51:55 PM3/30/22
to Google Ads API and AdWords API Forum
Team,

Please clarify below points :
1. Location Extension is still not supported via Assets
2. Hence, is it allowed to create extensions usings Feeds service ?
3. If point 2 is Yes, Can you please guide me to the correct document with steps to create the Location Extensions via REST API please .
I Tried the steps defined here : https://developers.google.com/google-ads/api/docs/location-extensions/affiliate-location-extensions?hl=en
But unable to proceed ahead :
   i. I created a Feed with following request :
POST:  https://googleads.googleapis.com/v10/customers/1406577639/feeds:mutate
{
    "operations": {
        "create": {
            "name": "LocationTest",
            "origin": "GOOGLE",
            "status": "ENABLED",
            "affiliateLocationFeedData": {
                "chainIds":["100013"],
                "relationshipType": "GENERAL_RETAILER"
            }
        }
    },
    "partialFailure": false,
    "validateOnly": false,
    "responseContentType": "MUTABLE_RESOURCE"
}

{
    "operations": {
        "create": {
            "placeholderTypes": [
                "LOCATION"
            ],
            "matchingFunction": {
                "operator": "CONTAINS_ANY",
                "leftOperands": [
                    {
                        "feedAttributeOperand": {
                             "feedId": "372113845",
                            "feedAttributeId": "13"
                        }
                    }
                ],
                "rightOperands": [
                    {
                       "feedAttributeOperand": {
                            "feedId": "372113845",
                            "feedAttributeId": "13"
                        }
                    }
                ]
            },
            "status": "ENABLED",
            "feed": "customers/1406577639/feeds/372113845",
            "adGroup": "customers/1406577639/adGroups/139789635584"
        }
    },
    "partialFailure": false,
    "validateOnly": false,
    "responseContentType": "MUTABLE_RESOURCE"
}

I am facing issue in STEP ii. with following error response:
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "errors": [
                    {
                        "errorCode": {
                            "adGroupFeedError": "NO_EXISTING_LOCATION_CUSTOMER_FEED"
                        },
                        "message": "Location AdGroupFeeds cannot be created unless there is a location CustomerFeed for the specified feed.",
                        "trigger": {
                            "stringValue": "FeedId{id=372113845}"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "feed"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "functionError": "INVALID_OPERAND_TYPE"
                        },
                        "message": "Operand Type not supported.",
                        "trigger": {
                            "stringValue": ""
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "matching_function"
                                },
                                {
                                    "fieldName": "right_operands",
                                    "index": 0
                                },
                                {
                                    "fieldName": "feed_attribute_operand"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "functionError": "INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA"
                        },
                        "message": "The matching function is invalid for use with a feed with a fixed schema.",
                        "trigger": {
                            "stringValue": "Function{operator=CONTAINS_ANY, lhsOperand=[FeedAttributeOperand{feedId=FeedId{id=372113845}, feedAttributeId=FeedAttributeId{id=13}}], lhsOperandOps=ListOperations{clear=false, operators=[UPDATE]}, rhsOperand=[FeedAttributeOperand{feedId=FeedId{id=372113845}, feedAttributeId=FeedAttributeId{id=13}}], rhsOperandOps=ListOperations{clear=false, operators=[UPDATE]}, functionString=null}"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "matching_function"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "5RofCeIXFR_eSWcwU48x3g"
            }
        ]
    }
}
Can you please guide me with a correct request format for STEP ii.
Am i missing any step ?
I even tried creating CustomerFeed . But i get an error even there .
Error is as follows :
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "errors": [
                    {
                        "errorCode": {
                            "requestError": "UNKNOWN"
                        },
                        "message": "The error code is not in this version.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "matching_function"
                                },
                                {
                                    "fieldName": "right_operands",
                                    "index": 0
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "requestError": "UNKNOWN"
                        },
                        "message": "The error code is not in this version.",
                        "trigger": {
                            "stringValue": "function_string: \"IN(FeedAttribute[372113845,10],FeedAttribute[372113845,10])\"\noperator: IN\nlhs_operand {\n  feed_attribute_operand {\n    feed_id: 372113845\n    feed_attribute_id: 10\n  }\n}\nrhs_operand {\n  feed_attribute_operand {\n    feed_id: 372113845\n    feed_attribute_id: 10\n  }\n}\n"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "matching_function"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "Z0QCGaNfFjEEvwQ5lEBrXA"
            }
        ]
    }
}

Google Ads API Forum Advisor

unread,
Mar 31, 2022, 11:25:13 AM3/31/22
to amap.acce...@gmail.com, adwor...@googlegroups.com
Hello,

Thanks for reaching out. I can confirm that location extensions are not available in asset format and that you must use feeds as recommended in this guide

In order to perform step ii, there must be an existing location customer feed. I see in the final step that you attempted to create one via the API, but an unhelpful error message was given. Can you please privately provide us with the create customer feed request, in addition to the given response? Alternatively, you can complete this part through the UI. 

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2ZI9n7:ref
Reply all
Reply to author
Forward
0 new messages