DFP Using Custom Fields to find Order

570 views
Skip to first unread message

Cow Yeung

unread,
Jul 24, 2015, 5:57:39 AM7/24/15
to Google's DoubleClick for Publishers API Forum
Hi,

I am using DFP v201505 in C#. Does it have any way to find the Order by Custom Fields?

Thanks,
Cow

Tesfamichael Hailegeorgis

unread,
Jul 24, 2015, 1:41:05 PM7/24/15
to Google's DoubleClick for Publishers API Forum, eri...@gmail.com
Hi Cow,

If you want to find the Order from the Custom Fields, then you will have to use the customFiedlService's  CustomField entityType property. Here is a C# example that might help. If you are asking how to use orderBy using customFields. You can use the CustomFieldService's getCustomFieldsByStatement and in the query Statement, you can specify orderByID.

Thanks,
Tesfamichael Hailegeorgis, DFP API Team

Cow Yeung

unread,
Jul 25, 2015, 10:32:07 AM7/25/15
to Google's DoubleClick for Publishers API Forum, dfpapi-adviso...@google.com
Sorry, maybe my question is not clear.
If I have a Order's Custom Field with Value, how can I filter out orders by the Custom Field Value.

Thanks,
Cow Yeung

Tesfamichael Hailegeorgis

unread,
Jul 27, 2015, 1:18:34 PM7/27/15
to Google's DoubleClick for Publishers API Forum, eri...@gmail.com
Hi Cow,

If the custom field is a drop down, then you can filter on the custom field value Id. Here is a Java example, which you will need to modify CustomFieldEntityType as Order.

Thanks,
Tesfamichael Hailegeorgis, DFP API Team

Cow Yeung

unread,
Aug 4, 2015, 5:45:48 AM8/4/15
to Google's DoubleClick for Publishers API Forum, eri...@gmail.com
Maybe I specify a example for my question.

Order Table:
    CustomField
Id Name [Number]
1 Order1 A001
2 Order2 B002
3 Order3 C003

How can I find the 'Order1' by the CustomField [Number] that the value is 'A001'?

Thanks,
Cow

Tesfamichael Hailegeorgis

unread,
Aug 4, 2015, 12:29:00 PM8/4/15
to Google's DoubleClick for Publishers API Forum, eri...@gmail.com
Hi Cow,

Can you please send the SOAP logs and network code so that we know which service of the API you make a call to? If you are asking about filtering by customFieldId for the ReportService. Unfortunately, filtering by customFieldId is not supported by the API.

Thanks,
Tesfamichael Hailegeorgis, DFP API Team

Cow Yeung

unread,
Aug 4, 2015, 9:05:43 PM8/4/15
to Google's DoubleClick for Publishers API Forum, eri...@gmail.com
Yes. I would like to do the filtering by customField for OrderService.

Thanks,
Cow

Tesfamichael Hailegeorgis

unread,
Aug 5, 2015, 11:04:05 AM8/5/15
to Google's DoubleClick for Publishers API Forum, eri...@gmail.com
Hi Cow,

If you are using the ReportService, currently, there's no way to filter on custom field values in the API's ReportService. You can include the custom field value in your report by setting its ID in your ReportQuery:

You could then perform post-processing on your end to filter out the desired value.

Another workaround would be to filter your report query on Order IDs. You could use the OrderService to determine the IDs of the Orders with your desired custom field value and then use those IDs in your report query's filter

Thanks,
Tesfamichael Hailegeorgis, DFP API Team
Reply all
Reply to author
Forward
0 new messages