WhatsApp · Arazzo Workflow

WhatsApp Read and Update Business Profile

Version 1.0.0

Read the current business profile, then apply updates to it.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

whatsapp

Workflows

update-business-profile
Fetch the current business profile and then update it.
Reads the current WhatsApp Business profile for the phone number and then submits an update with the supplied profile fields.
2 steps inputs: about, accessToken, address, description, email, phoneNumberId, websites outputs: previousAbout, updated
1
readProfile
getBusinessProfile
Read the current WhatsApp Business profile fields for the phone number.
2
applyProfileUpdate
updateBusinessProfile
Submit an update to the WhatsApp Business profile with the supplied fields.

Source API Descriptions

Arazzo Workflow Specification

whatsapp-update-business-profile-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: WhatsApp Read and Update Business Profile
  summary: Read the current business profile, then apply updates to it.
  description: >-
    Keeps a WhatsApp Business profile current. The workflow first reads the
    existing profile for the phone number so the caller can see the current
    values, and then applies an update with new about text, description, email,
    address, and websites. Every step spells out its request inline so the flow
    can be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: whatsappCloudApi
  url: ../openapi/whatsapp-cloud-api-openapi.yml
  type: openapi
workflows:
- workflowId: update-business-profile
  summary: Fetch the current business profile and then update it.
  description: >-
    Reads the current WhatsApp Business profile for the phone number and then
    submits an update with the supplied profile fields.
  inputs:
    type: object
    required:
    - accessToken
    - phoneNumberId
    properties:
      accessToken:
        type: string
        description: Access token with whatsapp_business_messaging permission.
      phoneNumberId:
        type: string
        description: The WhatsApp phone number ID whose profile is updated.
      about:
        type: string
        description: New about text (max 139 characters).
      description:
        type: string
        description: New business description (max 512 characters).
      email:
        type: string
        description: New contact email address.
      address:
        type: string
        description: New business address.
      websites:
        type: array
        description: Up to two website URLs.
        items:
          type: string
  steps:
  - stepId: readProfile
    description: >-
      Read the current WhatsApp Business profile fields for the phone number.
    operationId: getBusinessProfile
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: phone-number-id
      in: path
      value: $inputs.phoneNumberId
    - name: fields
      in: query
      value: about,address,description,email,profile_picture_url,websites,vertical
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      currentAbout: $response.body#/data/0/about
      currentDescription: $response.body#/data/0/description
  - stepId: applyProfileUpdate
    description: >-
      Submit an update to the WhatsApp Business profile with the supplied fields.
    operationId: updateBusinessProfile
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: phone-number-id
      in: path
      value: $inputs.phoneNumberId
    requestBody:
      contentType: application/json
      payload:
        messaging_product: whatsapp
        about: $inputs.about
        description: $inputs.description
        email: $inputs.email
        address: $inputs.address
        websites: $inputs.websites
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      success: $response.body#/success
  outputs:
    previousAbout: $steps.readProfile.outputs.currentAbout
    updated: $steps.applyProfileUpdate.outputs.success