Como usar
- Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
- Consulte no original as ferramentas, credenciais e ambientes necessários.
- Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/phatnt95/salesforce-apex-agent --skill apex-async-integrationAntes de começar
- A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
- Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.
Apex Async & Integration
Decision tree
- Small deferred unit of work -> Queueable.
- Very large data set -> Batch Apex or an external bulk-processing mechanism.
- Time-based execution -> Schedulable, usually delegating to Queueable/Batch.
- Legacy/simple async requirement ->
@futureonly when its constraints fit; do not introduce it by default. - Event-driven decoupling -> Platform Events / Change Data Capture when appropriate.
- External HTTP callout -> Named Credential / External Credential plus an async boundary if the invocation context cannot perform a callout.
Queueable
- Pass only serializable, bounded state.
- Avoid chaining indefinitely.
- Design idempotency when retries or duplicate execution are possible.
- Make failure handling observable.
Batch
- Choose batch size deliberately based on query shape and per-record work.
- Keep each execute scope independently safe.
- Avoid stateful mode unless accumulated state is necessary.
- Make finish behavior explicit.
Callouts
- Use Named Credentials/External Credentials for authentication.
- Set timeouts deliberately.
- Validate response status and payload.
- Avoid logging secrets or sensitive payloads.
- Define retry policy only for transient failures; do not blindly retry permanent validation/authentication failures.
- Design idempotency for operations that can be retried.
Failure model
Document:
- transient vs permanent errors;
- retry count/backoff;
- dead-letter/manual recovery path;
- transaction rollback behavior;
- user-visible status;
- monitoring/logging.




