If a connection to an External Application requires something unique, you can create a custom API Resource Config. This allows you to set up custom parameters to override Fonteva defaults or insert any variables you might require from the user that do not already have default values.

The methods available to configure this object:

  • setParameters -  a list of variables used for URL calls. These will be mapped to the API Variable object and overwrite them. This a map value and returns a string of data.
  • setUriParameters -  a list of parameters that are required in the URI itself. This is a list of string values that replace integer placeholders in the URI (e.g.: /act_{0}/adcampaigns - a URI parameter will replace the bold portion of the URL with the appropriate URI value).
  • setHeaders - a list of header values that need to be added to this request. This is a map value that returns a string of data. 
  • setCheckForExistingRecords - this is a boolean value used to control whether you want your Fonteva App to check for updates to existing records or create a new record for each piece of data requested.
  • setRawResponseOnly - this boolean value will indicate whether you want the raw response saved or parsed.

This configuration is not stored in the database. It resides in framework.API class in the Fonteva code. For more information on configuration, see Api.ResourceConfig and contact Fonteva.

Scenario: API Resources Config Used to Connect to Twitter

framework.RegisteredObject adPubReq = new
            adPubReq.sObjectName =
            adPubReq.namespace = 'g10framework';
            adPubReq.isEnabled = true;
            adPubReq.isStandard = false;
            adPubReq.triggersEnabled = true;
            adPubReq.soqlLimit = String.valueOf(2000);
            adPubReq.soqlOrderBy =
SObjectType.Twitter_Tweet__c.fields.Name.getName() + ' ASC';