ActiveCampaign · Arazzo Workflow

ActiveCampaign Create Deal and Set Custom Field Value

Version 1.0.0

Create a deal then write a value to one of its custom fields.

1 workflow 1 source API 1 provider
View Spec View on GitHub Marketing AutomationEmail MarketingCRMSales AutomationCustomer ExperienceArazzoWorkflows

Provider

activecampaign

Workflows

create-deal-set-custom-field
Create a deal and set a custom field value on it.
Creates a deal and then writes the supplied value to the supplied deal custom field for the new deal.
2 steps inputs: apiToken, contactId, currency, customFieldId, fieldValue, groupId, ownerId, stageId, title, value outputs: dealCustomFieldDataId, dealId
1
createDeal
create-a-deal-new
Create the deal against the supplied contact, pipeline, and stage.
2
setCustomField
create-custom-deal-field-value
Write the supplied value to the deal custom field for the new deal.

Source API Descriptions

Arazzo Workflow Specification

activecampaign-create-deal-set-custom-field-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: ActiveCampaign Create Deal and Set Custom Field Value
  summary: Create a deal then write a value to one of its custom fields.
  description: >-
    Captures structured data on a new deal. A deal is created against a contact,
    pipeline, and stage, then a value is written to the supplied deal custom
    field for that deal. Every step spells out its request inline, including the
    Api-Token authentication header, so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: activecampaignApi
  url: ../openapi/activecampaign-v3.json
  type: openapi
workflows:
- workflowId: create-deal-set-custom-field
  summary: Create a deal and set a custom field value on it.
  description: >-
    Creates a deal and then writes the supplied value to the supplied deal
    custom field for the new deal.
  inputs:
    type: object
    required:
    - apiToken
    - title
    - contactId
    - value
    - currency
    - groupId
    - stageId
    - ownerId
    - customFieldId
    - fieldValue
    properties:
      apiToken:
        type: string
        description: ActiveCampaign API token sent in the Api-Token header.
      title:
        type: string
        description: Title of the deal.
      contactId:
        type: string
        description: Identifier of the primary contact on the deal.
      value:
        type: integer
        description: Deal value in cents.
      currency:
        type: string
        description: Three-letter lowercase currency code, such as usd.
      groupId:
        type: string
        description: Identifier of the pipeline the deal belongs to.
      stageId:
        type: string
        description: Identifier of the stage the deal starts in.
      ownerId:
        type: string
        description: Identifier of the user who owns the deal.
      customFieldId:
        type: integer
        description: Identifier of the deal custom field to set.
      fieldValue:
        type: string
        description: Value to write to the deal custom field.
  steps:
  - stepId: createDeal
    description: Create the deal against the supplied contact, pipeline, and stage.
    operationId: create-a-deal-new
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        deal:
          title: $inputs.title
          contact: $inputs.contactId
          value: $inputs.value
          currency: $inputs.currency
          group: $inputs.groupId
          stage: $inputs.stageId
          owner: $inputs.ownerId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      dealId: $response.body#/deal/id
  - stepId: setCustomField
    description: Write the supplied value to the deal custom field for the new deal.
    operationId: create-custom-deal-field-value
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        dealCustomFieldDatum:
          dealId: $steps.createDeal.outputs.dealId
          customFieldId: $inputs.customFieldId
          fieldValue: $inputs.fieldValue
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      dealCustomFieldDataId: $response.body#/dealCustomFieldDatum/id
  outputs:
    dealId: $steps.createDeal.outputs.dealId
    dealCustomFieldDataId: $steps.setCustomField.outputs.dealCustomFieldDataId