Create DSP Shell Campaign

The attached (downloadable) Zip file contains 2 code snippets demonstrating how to create a shell DSP campaign when migrating Native (Gemini) campaigns and how to map Gemini campaigns and adgroups to a DSP Native IO line.

You can download both code snippets by clicking Create DSP Shell Campaign Java code snippets.

Note that the download also contains a Microsoft XL spreadsheet, which describes Gemini campaign and ad group bidding strategies and how they map to DSP lines for media types, billing methods and goal types and modes. You’ll need to reference this spreadsheet when working the Example 2 GeminiCampaignAdGroupToDSPLineNativeIO.java code snippet.

Java Code Snippets

Example 1: CreateShellDspCampaign.java shows you how create a shell DSP campaign when migrating Native (Gemini) campaigns.

Example 2: GeminiCampaignAdGroupToDSPLineNativeIO.java shows you how to map Gemini campaigns and adgroups to a DSP Native IO line.

The following is a sample DSP line payload from Example 2, and a code snippet that demonstrates how to map these fields from Gemini Campaigns and adgroups.

POST /traffic/lines
{
  "name": "gemini adgroup name",
  "orderId": 462137,
  "status": "ACTIVE",
  "mediaType": "DISPLAY",
  "pacingModeType": "EVEN",
  "budgetType": "CURRENCY",
  "goalType": "CPC",
  "billingMethodType": "MARGIN",
  "billingPrice": 2,
  "marginType": "TOTAL_BUDGET",
  "bidPrice": 1,
  "maxGoal": 1,
  "marginGoal": 25,
  "goalAmount": 1,
  "isNativeEnabled": false,
  "completionThreshold": 0,
  "schedules": [
    {
      "startDateStr": "2020-09-29",
      "endDateStr": "2020-12-28",
      "budget": 2000,
      "dailyBudgetType": "AUTO_ALLOCATED"
    }
  ]
}

@param geminiCampaign source gemini campaign object
@param geminiAdGroup source gemini adgroup object
@param geminiAdGroups all source gemini adgroups under current geminiCampaign
@param dspAccountId dsp account id
@param dspCampaign dsp shell campaign object we already created
**/