I am building an application that creates campaigns, adgroups, keywords and ads through the API.
My application has a local representation of these things. i.e. I have a database tables which contains campaigns/adwords etc.
The problem: It is difficult to update my local models with the return values.
To illustrate:
- I create a 10 adgroups using "AdGroupService".
- I want to save the adgroupIds returned from the API to my database.
- I need to match the returned adGroup to my local model.
Ideal solution, if the API has a "referenceId" for each operand:
- When creating the AdGroupOperation, allow a referenceId to be specified.
- When returning the value after execution, include the referenceId value.
- This allows me to map what I sent out to what I get back. So I can save the result back into my models.
How I am working around this:
- I am using adgroup name or matching individual properties one by one.
Can anyone suggest a better method to working around this?
Or can someone from Google provide an ideal solution for this problem?