Prompt Builder

Ground a prompt template in curated context instead of raw merge fields. The four actions are ordinary Apex actions, so Prompt Builder can add one as a resource — no flow, no class to write. The template gets the same payload an agent gets, and it follows the entity when you change it.

Add the action as a resource

  1. Setup → Prompt Builder. Open your template, or click New Prompt Template and choose Flex. Add a resource for the record: set Source Type to Object and pick the object.
  2. In Resources, click + beside Actions and choose Apex.
  3. Pick the action. They’re in the Akoonu category, labeled ContextWorks: Get Records, Find Records, and Get Catalog — installed, they carry the ctxl namespace.
  4. Fill in the inputs. Record IDs is usually the template’s record variable; Level, Format, Domain, and Entity are optional.
  5. Put the cursor where the context belongs in the prompt body and insert the action’s Result output.
  6. Preview against a real record to see the resolved prompt, then Activate.

Which action

ActionUse forInputs that matter
Get RecordsOne record, or a few by IDRecord IDs, Level, Domain
Find RecordsA set the template describes — this quarter’s open renewalsObject API Name, Filters, Sort By, Max Rows
Get CatalogRarely — it’s discovery, for agents that plan their own calls

Full input reference: Invocable actions. Filter syntax: Query filters.

Notes

  • Leave Format as markdown. It reads as prose to the model. Use json only when something downstream parses the output.
  • Match the Level to the job. detailed is the default; drop to standard or list when the prompt covers several records, or when context crowds out your instructions.
  • Set Domain, not Entity, for a mix of objects. Each record is read through that domain’s view for its own object.
  • The template resolves as the user who runs it, so security applies unchanged — two users can get different context from one template.
  • A failed call returns Success = false and an Error Message rather than throwing, so the template still renders. Check Preview if a section comes back empty.

Need an address the inputs don’t express? A scoped tool is a plain invocable action too — it appears in the same picker, with the domain and level already pinned.

What’s next