Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleContent

Table of Contents

Table of Contents
maxLevel2


Note

In order to use the Apply Targeting Sets API, your Salesforce Org needs to have API usage activated through having an API usage License. 


Numberedheadings
start-numbering-with1

The Apply Targeting Sets API function is implemented as Apex class and is exposed as REST web service by using Salesforce standard functionality (see Apex Developer Guide for more information). For general information about the dynamic pricing feature, see TODO

REST web service

URL

https://<my-domain-name>.my.salesforce.com/services/apexrest/ADvendio/ADvendio__Campaign_Item__c/ApplyTargetingSets/

Method

PATCH

URL Params

-

Data Params

A JSON object with the attribute campaignItems, containing a JSON serialized list of Campaign Items. And a second attribute targetingSetIds (JSON serialized List<List<Id>>). The lists have to have the same size, the Targeting Set Ids of the first list entry will be applied to the first list entry of the campaignItems list and so on.

Example: { "campaignItems":[{<Campaign Item>}, ...], "targetingSetIds":["a2d1X0000004zsCQAQ", ...]}

Success Response

Code: 200

Content: A JSON serialized list of the Campaign Items from the request body, but now with updated targeting fields.

Example: [{<Campaign Item>}, ...]

Error Response

See Salesforce Apex REST Documentation

Logic


Examples

Get a Session-ID

bashGet a Session ID


Connected App

Get CLIENT_ID and CLIENT_SECRET from any connected app or create a new app in your org: App Manager -> New Connected App


Simple request


Usage in Apex

java


...