BulkOfflineConversion

marketing-data 1 Reputation point
2020-09-08T13:02:53.883+00:00

Hi

I'm following this script:
https://github.com/BingAds/BingAds-Python-SDK/blob/master/examples/v13/bulk_offline_conversions.py

I'm not sure how to edit the script for many conversions?
Is there any limitation? (e.g - 1000 conversion at a time)

I'm thinking about to loop just the below.
Is that make sense?
So the list upload_entities will be with many BulkOfflineConversion objects.

If you can share full code for such example it will be great.

    bulk_offline_conversion = BulkOfflineConversion()
    offline_conversion = set_elements_to_none(campaign_service.factory.create('OfflineConversion'))
    # If you do not specify an offline conversion currency code,
    # then the 'CurrencyCode' element of the goal's 'ConversionGoalRevenue' is used.
    offline_conversion.ConversionCurrencyCode = "USD"
    # The conversion name must match the 'Name' of the 'OfflineConversionGoal'.
    # If it does not match you won't observe any error, although the offline
    # conversion will not be counted.
    offline_conversion.ConversionName = "My Conversion Goal Name"
    # The date and time must be in UTC, should align to the date and time of the
    # recorded click (MicrosoftClickId), and cannot be in the future.
    offline_conversion.ConversionTime = datetime.utcnow()
    # If you do not specify an offline conversion value,
    # then the 'Value' element of the goal's 'ConversionGoalRevenue' is used.
    offline_conversion.ConversionValue = 10
    offline_conversion.MicrosoftClickId = "f894f652ea334e739002f7167ab8f8e3"
    bulk_offline_conversion.offline_conversion = offline_conversion

    upload_entities.append(bulk_offline_conversion)
Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
401 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Eric Urban - MSFT 626 Reputation points Microsoft Employee
    2020-09-08T20:35:07.45+00:00

    @marketing-data yes you could loop lines 1-17 and append each BulkOfflineConversion to upload_entities. Having said that, each BulkOfflineConversion should be modified as appropriate e.g., perhaps a different MicrosoftClickId and ConversionValue per record.

    I hope this helps!