Mindbody · Arazzo Workflow

Mindbody Log Client Contact

Version 1.0.0

Find a client and add a contact log entry to their record.

1 workflow 1 source API 1 provider
View Spec View on GitHub FitnessWellnessBeautySchedulingBookingPoint of SaleStudiosSalonsSpasWebhooksArazzoWorkflows

Provider

mindbody

Workflows

log-client-contact
Resolve a client and record a contact log entry against their record.
Searches the client directory and, when a client is found, adds a contact log entry with the supplied text, contact method, and assigned staff member.
2 steps inputs: apiKey, assignedToStaffId, authorization, contactMethod, searchText, siteId, text outputs: clientId, contactLogId
1
findClient
getClients
Search the client directory by the supplied search text and capture the first matching client id.
2
addContactLog
addContactLog
Add a contact log entry recording the outreach interaction against the matched client.

Source API Descriptions

Arazzo Workflow Specification

mindbody-log-client-contact-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Mindbody Log Client Contact
  summary: Find a client and add a contact log entry to their record.
  description: >-
    A CRM follow-up flow for studio staff. The workflow searches for a client by
    search text, captures the matching client id, and adds a contact log entry
    recording an outreach interaction. Every step inlines the Mindbody API-Key,
    SiteId, and staff authorization headers along with its request body so the
    flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: mindbodyApi
  url: ../openapi/mindbody-public-api-v6-openapi-original.yml
  type: openapi
workflows:
- workflowId: log-client-contact
  summary: Resolve a client and record a contact log entry against their record.
  description: >-
    Searches the client directory and, when a client is found, adds a contact
    log entry with the supplied text, contact method, and assigned staff
    member.
  inputs:
    type: object
    required:
    - apiKey
    - siteId
    - authorization
    - searchText
    - text
    - contactMethod
    - assignedToStaffId
    properties:
      apiKey:
        type: string
        description: The Mindbody-issued API key sent in the API-Key header.
      siteId:
        type: string
        description: The ID of the site from which to pull data and write records.
      authorization:
        type: string
        description: A staff user authorization (OAuth bearer) token.
      searchText:
        type: string
        description: Name, email, or other text used to find the client.
      text:
        type: string
        description: The body of the contact log entry.
      contactMethod:
        type: string
        description: How the client wants to be contacted.
      assignedToStaffId:
        type: integer
        description: The ID of the staff member the contact log is assigned to.
  steps:
  - stepId: findClient
    description: >-
      Search the client directory by the supplied search text and capture the
      first matching client id.
    operationId: getClients
    parameters:
    - name: version
      in: path
      value: '6'
    - name: API-Key
      in: header
      value: $inputs.apiKey
    - name: siteId
      in: header
      value: $inputs.siteId
    - name: authorization
      in: header
      value: $inputs.authorization
    - name: request.searchText
      in: query
      value: $inputs.searchText
    - name: request.limit
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      clientId: $response.body#/Clients/0/Id
    onSuccess:
    - name: clientFound
      type: goto
      stepId: addContactLog
      criteria:
      - context: $response.body
        condition: $.Clients.length > 0
        type: jsonpath
    - name: clientMissing
      type: end
      criteria:
      - context: $response.body
        condition: $.Clients.length == 0
        type: jsonpath
  - stepId: addContactLog
    description: >-
      Add a contact log entry recording the outreach interaction against the
      matched client.
    operationId: addContactLog
    parameters:
    - name: version
      in: path
      value: '6'
    - name: API-Key
      in: header
      value: $inputs.apiKey
    - name: siteId
      in: header
      value: $inputs.siteId
    - name: authorization
      in: header
      value: $inputs.authorization
    requestBody:
      contentType: application/json
      payload:
        ClientId: $steps.findClient.outputs.clientId
        Text: $inputs.text
        ContactMethod: $inputs.contactMethod
        AssignedToStaffId: $inputs.assignedToStaffId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contactLogId: $response.body#/Id
  outputs:
    clientId: $steps.findClient.outputs.clientId
    contactLogId: $steps.addContactLog.outputs.contactLogId