Skip to content

Instantly share code, notes, and snippets.

View sfboss's full-sized avatar

SFDCBoss sfboss

View GitHub Profile
public with sharing class customApprovalsController {
@AuraEnabled
public static List<wrapperClass> getApprovals(String theType, String theCommentFilter){
List<wrapperclass> theApprovals = getPendingList(theType, theCommentFilter);
return theApprovals;
}
/**
* @description : this is a class that will be setup in a Salesforce Experience Site as a public API that can accept data from Pivotal Tracker
* @author : copyright sfdcboss.com
*/
@RestResource(urlMapping = '/handleInboundPayload/*')
/*
Defined in PivotalTrackerUpdatePayload but posting here for reference as well. This is the structure we can expect from the PT Webhooks.
kind
— The value of 'kind' will reflect the specific type of activity that an activity resource represents. The value will be a string that ends in '_activity' and which starts with a name based on the change which occurred. This field is read only.
guid
@sfboss
sfboss / PivotalTrackerEndpoint.cls
Created July 31, 2022 06:35
APEX REST for Pivotal Tracker Webhook
/**
* @description : this is a class that will be setup in a Salesforce Experience Site as a public API that can accept data from Pivotal Tracker
* @author : copyright sfdcboss.com
*/
@RestResource(urlMapping = '/handleInboundPayload/*')
/*
Defined in PivotalTrackerUpdatePayload but posting here for reference as well. This is the structure we can expect from the PT Webhooks.
kind
— The value of 'kind' will reflect the specific type of activity that an activity resource represents. The value will be a string that ends in '_activity' and which starts with a name based on the change which occurred. This field is read only.
guid
@sfboss
sfboss / PivotalTrackerUpdatePayload.cls
Created July 28, 2022 03:39
Example payload from Pivotal Tracker Rest API
global class PivotalTrackerUpdatePayload {
public enum kindTypes { pull_request_create_activity, pull_request }
public class New_values {
public Long accepted_at;
public Integer before_id;
public Integer after_id;
public String current_state;
public Long updated_at;