- Admins. Automate m3ter from Flow without waiting on a developer.
- System Integrators. Offers a supported, reusable primitive to build customer solutions on, instead of hand-rolling callouts every time.
- Call any m3ter endpoint from Flow/Apex.
- Pull values out of responses without writing Apex.
- Ready-to-clone example flows so teams start from something that works, not a blank canvas
- Key Components
- Prerequisites
- Organization-Scoped Endpoint Paths
- Apex and Flow Examples
- Limits
- Sync Logs and External Mappings
Key Components
Notes:
- The example classes and Flows are copy-and-adapt templates — one per operation/pattern.
- To adapt: change the endpoint/operation, and map the fields you need from the response.
Prerequisites
Please ensure the following prerequisites are in place before using the Generic m3ter API Invocable Action feature:- The m3 Sync package is installed and configured (Access Key, API Secret, Base URL, Organization Id) in Integration Settings.
- Users are assigned the m3ter_Admin or m3ter_User permission set.
Organization-Scoped Endpoint Paths
Main points to note:- Supply the path relative to your m3ter Organization:
- The service prefixes
https://<baseUrl>/organizations/<orgId>/ - So for example for accounts:
.../organizations/<orgId>/accounts
- The service prefixes
- Root-level endpoints - for example:
/organizationconfig,/oauth- are not supported. - Supported operations: GET, POST, PUT, DELETE.
- The canonical list of endpoints and payloads can be found in the m3ter API Reference documentation at: https://docs.m3ter.com/
Apex and Flow Examples
This section sets out some Apex and Flow examples using the Generic m3ter API Invocable Action feature:Apex Usage Example
Apex:- operation (required),
- endpoint (required),
- queryParams (optional JSON object of string values),
- requestBody (optional JSON body for POST/PUT).
- success,
- httpStatusCode,
- responseBody,
- errorMessage,
- nextToken,
- hasMoreResults.
Apex Usage Complex Example
Apex:Flow Usage
Two-action pattern:- Call m3ter API (M3terGenericAPIService) — set Operation and Endpoint; outputs Response Body, Success, HTTP Status Code, Next Token, Has More Results.
- Extract m3ter JSON Fields (M3terJsonExtractInvocable) — optional; pull values out of the response by Paths (e.g. [“data[0].name”, “data[0].address.locality”]). Object keys and array indexes are supported; an unmatched path returns null.
- Values — one entry per input path, in order.
- Element Values — when a path resolves to a JSON array, its elements are returned here so you can loop over the array in Flow.
{!Call_m3ter_API.success} and surface {!Call_m3ter_API.errorMessage} on failure.
See the two shipped example Flows for working patterns: dependent-entity chaining, dynamic-choice-set drop-downs bound to M3terListOptionsExample, product-filtered lists, looping over segmented fields, and assembling a JSON request body from a Formula.
Limits
Note the following limitations:- Synchronous callout in the current transaction. Because of Salesforce’s “no callout after DML” rule, do not perform DML before this action in the same transaction/Flow run — do all callouts first and DML last, or split across transactions.
- Up to 100 callouts per transaction; request/response bodies bounded by the 6 MB heap limit; 120s callout timeout.
- Errors never throw out of the invocables — you must check success / errorMessage.
Sync Logs and External Mappings
The Generic m3ter API Invocable Action feature is a raw pass-through service — it deliberately does less than the standard sync actions (Sync to m3ter, etc.), and you own the difference:- No Sync Logs. Calls do not create SyncLog__c or SubmitSnapshot__c records. If you need an audit trail, you must log it yourself after the call.
- Not external-mapping aware. Performing a create through this service makes a brand-new m3ter entity with no Salesforce ↔ m3ter link, so the package’s sync features won’t reconcile it and repeat calls create duplicates. If linkage matters, prefer the standard Sync to m3ter action; otherwise keep your own calls idempotent (look up before create) and maintain the link via the externalmappings endpoint yourself. See https://docs.m3ter.com/.