WorkBuddy

Interact with WorkBuddy API - Field service management

Actions227

Jobs Activities → Preview an SMS activity (Jobs)

AI-generated

Summary

Preview an SMS activity for a given job

Inputs

  • jobId (required) — Job ID or job number (e.g. J12345)
  • templateId — Template ID to pre-populate fields from a template
  • body — Message body content (HTML supported for email)
  • to — Recipients
  • labelIds — Array of label/tag IDs to attach (comma-separated, e.g. "id1,id2")
  • sharing — Sharing options — control visibility to customer portal and field app
  • requestOptions — Add Option
  • allowUnauthorizedCerts — Whether to accept the response even if SSL certificate validation is not possible
  • proxy — HTTP proxy to use. If authentication is required it can be defined as follow: http://username:password@myproxy:3128
  • timeout — Time in ms to wait for the server to send response headers (and start the response body) before aborting the request

Output shape

a JSON object representing the preview of the SMS activity

returns a single preview record; errors are indicated by HTTP status and an error envelope

Examples

Example 1: Preview an SMS using a job ID and template

jobId=J12345, templateId=TM001, body='

Hello

', to=[{email:'user@example.com'}], labelIds='id1,id2', sharing={sharedWithCustomer:true}, requestOptions={batching:{batchSize:50}}

Example 2: Preview an SMS with custom body and recipient

jobId=J67890, body='SMS text', to=[{phone:'5551234567'}], labelIds='', sharing={}, requestOptions={timeout:5000}

Links

Discussion