Enable APIs

After onboarding the tenant account, enable or disable specific API(s) (External API, Journey API), based on the services agreed upon in the contract..

Pre-requisites

Make sure the following things are in place, before enabling the API:

  • Tenant ID must be available.
  • Database access (preferably via a secure SQL client) to update the DMPChannel and DMPCampaignChannelMapping tables.
  • Knowledge of the DMPChannel IDs for each API type say:
    • For External API, the DMPChannelId is 25
    • For Journey API (Trigger API), the DMPChannelId is 31

Enable API

To enable the API in CDP and assign it with a specific tenant, follow the steps below:

  1. Confirm API entries exist in the DMPChannel table.
    • To check if the External and Journey API definitions exist in the DMPChannel table, run the below query.
      SELECT * FROM DMPChannel WHERE ID IN (25, 31);
    • If the External API is missing, run the query below to insert the External API.
      -- Example: Already existing ID is 25
      -- Only needed if External API is not yet defined
      INSERT INTO DMPChannel (
        ID, NAME, DESCRIPTION, DisplayName, ECDisplayName, Preference, Config, TYPE
      ) VALUES (
        25, 'EXTERNAL API', 'EXTERNAL API', 'External API', 'Trigger API', 21, '{"isSegChannelCap":1}', trapi
      );
    • If the Journey API is missing, run the query below to insert the Journey API.
      -- Example: Already existing ID is 31
      INSERT INTO DMPChannel (
        ID, NAME, DESCRIPTION, DisplayName, ECDisplayName, Preference, Config, TYPE
      ) VALUES (
        31, 'JOURNEY API', 'JOURNEY API', 'Journey API', 'Trigger API', 21, '{"isSegChannelCap":1}', 'trapi'
      );
  2. After including the API, enable the API for a specific Tenant. For a given tenant say Tenant ID = 1234, insert entries into the DMPCampaignChannelMapping table.
    1. To enable the External API for the specific tenant, run the query below:
      -- Update <Tenant ID> with actaul Tenant ID 
      
      INSERT INTO DMPCampaignChannelMapping
      (CampaignId,DMPChannelId,Status,ImpressionCap,ImpressionEnabled,FrequencyCaps,EmailScheduleTimeInMins,IcDisabled,CampaignUserIdPriorityId) VALUES(<Tenant ID>,25,1,100000,0,'{"monthly":{"value":15000},"weekly":{"value":13500},"daily":{"value":20000,"isPersistent":0},"lifetime":100000}',10,1,5);
    2. To enable the Journey API for the specific tenant, run the query below:
      -- Update <Tenant ID> with actaul Tenant ID
      
      INSERT INTO DMPCampaignChannelMapping (CampaignId,DMPChannelId,Status,ImpressionCap,ImpressionEnabled,FrequencyCaps,EmailScheduleTimeInMins,IcDisabled,CampaignUserIdPriorityId) VALUES (<Tenant ID>,31,1,100000,0,'{"monthly":{"value":15000},"weekly":{"value":13500},"daily":{"value":200,"isPersistent":0},"lifetime":100000}',10,0,84);