Custom Actions
Custom actions, also known as invocable methods, provide a friendly way of calling the functionality of an API via a user interface.
Each Certinia custom action resides within an Apex class, which calls an API method. You can use these actions in Salesforce Flow Builder to call an API method to execute Apex code. See the Salesforce Help for more information.
Invocable Methods for Project Creation or when Adding Records to an Existing Project
When creating a project or adding records to an existing project, you can use the following custom actions.
Apex Class | Purpose | API Method |
---|---|---|
ActionCPFTAccounts | Creates new projects, based upon supplied template projects, attached to given accounts. | CreateProjectFromTemplateService.createProjectsFromTemplatesAndAccounts |
ActionCPFTOpportunities | Creates new projects, based upon supplied template projects, attached to given opportunities. | CreateProjectFromTemplateService.createProjectsFromTemplatesAndOpportunities |
ActionAddRelatedRecordsFromTemplates | Adds all records on a selected project or project template to an existing project. | AddFromProjectTemplateService.addFromTemplates |
ActionAddAssignmentsFromTemplates | Adds all assignments that are on a project or project template to an existing project. | AddFromProjectTemplateService.addFromTemplates |
ActionAddMilestonesFromTemplates | Adds all milestones that are on a project or project template to an existing project. | AddFromProjectTemplateService.addFromTemplates |
ActionAddTasksFromTemplates | Adds all project tasks that are on a project or project template to an existing project. | AddFromProjectTemplateService.addFromTemplates |
ActionAddResourceRequestsFromTemplates | Adds all resource requests that are on a project or project template to an existing project or opportunity. | AddFromProjectTemplateService.addFromTemplates |
The process is run as the user who triggered it when using custom actions with Salesforce Flow Builder. This means, if ActionCPFTOpportunities is fired at the end of a flow, for example, triggered when an opportunity's stage is changed to "Closed - Won", the user performing the action needs a PSA license and the appropriate PSA permission controls. For instance, the Staffing permission control is required when the template project contains resource requests. This enables this user to create the project and appropriate child objects upon it.
See the PSA API Developer's Reference for further information about our Apex classes. For more information, see Documentation in Certinia Community. For more information about using custom actions, see the Salesforce documentation for Flows.
Invocable Methods for Use with the Billing Events Integration
When the Billing Events Integration is enabled in your org, the following custom actions can be used to automatically create billing documents for valid billing events.
Apex Class | Purpose | API Method |
---|---|---|
BillingDocServiceActionCreateBDAsync | Asynchronously creates billing documents when given valid billing event IDs. This method should not be used if it might be triggered from a batch execution, or other contexts where starting a batch job won't work. | createBillingDocumentAsync |
BillingDocServiceActionCreateBDSync | Synchronously creates billing documents when given valid billing event IDs. | createBillingDocumentSync |
A billing event is only eligible for billing document creation if:
- The billing event has been released.
- The billing event is not already invoiced.
- The project related to the billing event has an account.
- The billing event's Original Billing Document field is empty.
You could set up a filter in your process to filter on these criteria.