Merge · Arazzo Workflow

Merge CRM Create an Account with a Contact

Version 1.0.0

Create a CRM account, attach a primary contact to it, and confirm the contact was written.

1 workflow 1 source API 1 provider
View Spec View on GitHub IntegrationsPlatformUnified APIAgent HandlerLLM GatewayArazzoWorkflows

Provider

merge

Workflows

create-account-and-contact
Create a CRM account and attach a primary contact to it.
Creates an account, creates a contact tied to that account, and confirms the contact.
3 steps inputs: accountName, accountToken, authorization, contactFirstName, contactLastName, industry, website outputs: accountId, contactId
1
createAccount
{$sourceDescriptions.crmApi.url}#/paths/~1crm~1v1~1accounts/post
Create the CRM account from the supplied name and optional firmographics.
2
createContact
{$sourceDescriptions.crmApi.url}#/paths/~1crm~1v1~1contacts/post
Create a contact linked to the newly created account.
3
confirmContact
{$sourceDescriptions.crmApi.url}#/paths/~1crm~1v1~1contacts~1{id}/get
Read the created contact back to confirm it was persisted with the correct account association.

Source API Descriptions

Arazzo Workflow Specification

merge-crm-create-account-and-contact-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Merge CRM Create an Account with a Contact
  summary: Create a CRM account, attach a primary contact to it, and confirm the contact was written.
  description: >-
    A common CRM write pattern for standing up a new customer record. The
    workflow creates an account, then creates a contact linked to that account,
    and finally reads the created contact back to confirm it was persisted with
    the correct account association. 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: crmApi
  url: ../openapi/merge-crm-api-openapi.yaml
  type: openapi
workflows:
- workflowId: create-account-and-contact
  summary: Create a CRM account and attach a primary contact to it.
  description: >-
    Creates an account, creates a contact tied to that account, and confirms
    the contact.
  inputs:
    type: object
    required:
    - authorization
    - accountToken
    - accountName
    - contactFirstName
    - contactLastName
    properties:
      authorization:
        type: string
        description: Production access token with the required "Bearer " prefix.
      accountToken:
        type: string
        description: The account token identifying the linked CRM end user.
      accountName:
        type: string
        description: The name of the account to create.
      industry:
        type: string
        description: The account's industry.
      website:
        type: string
        description: The account's website URL.
      contactFirstName:
        type: string
        description: The primary contact's first name.
      contactLastName:
        type: string
        description: The primary contact's last name.
  steps:
  - stepId: createAccount
    description: >-
      Create the CRM account from the supplied name and optional firmographics.
    operationPath: '{$sourceDescriptions.crmApi.url}#/paths/~1crm~1v1~1accounts/post'
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Account-Token
      in: header
      value: $inputs.accountToken
    requestBody:
      contentType: application/json
      payload:
        model:
          name: $inputs.accountName
          industry: $inputs.industry
          website: $inputs.website
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      accountId: $response.body#/model/id
  - stepId: createContact
    description: >-
      Create a contact linked to the newly created account.
    operationPath: '{$sourceDescriptions.crmApi.url}#/paths/~1crm~1v1~1contacts/post'
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Account-Token
      in: header
      value: $inputs.accountToken
    requestBody:
      contentType: application/json
      payload:
        model:
          first_name: $inputs.contactFirstName
          last_name: $inputs.contactLastName
          account: $steps.createAccount.outputs.accountId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactId: $response.body#/model/id
  - stepId: confirmContact
    description: >-
      Read the created contact back to confirm it was persisted with the
      correct account association.
    operationPath: '{$sourceDescriptions.crmApi.url}#/paths/~1crm~1v1~1contacts~1{id}/get'
    parameters:
    - name: id
      in: path
      value: $steps.createContact.outputs.contactId
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Account-Token
      in: header
      value: $inputs.accountToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contactId: $response.body#/id
      account: $response.body#/account
  outputs:
    accountId: $steps.createAccount.outputs.accountId
    contactId: $steps.confirmContact.outputs.contactId