arazzo: 1.0.1
info:
title: ActiveCampaign Create Deal and Schedule a Task
summary: Create a deal then schedule a follow-up task against it.
description: >-
A sales follow-up flow. A deal is created against a contact, pipeline, and
stage, then a follow-up task with a due date is scheduled against the new
deal. The task is related to the deal via the relid relation. 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: dealsApi
url: ../openapi/activecampaign-deals-api-openapi.yml
type: openapi
workflows:
- workflowId: create-deal-add-task
summary: Create a deal and schedule a follow-up task against it.
description: >-
Creates a deal and then schedules a follow-up task related to the new deal
with the supplied due date and task type.
inputs:
type: object
required:
- apiToken
- title
- contactId
- value
- currency
- groupId
- stageId
- ownerId
- dueDate
- dealTaskTypeId
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.
dueDate:
type: string
description: Due date for the task in ISO 8601 format.
dealTaskTypeId:
type: integer
description: Identifier of the task type to assign to the task.
taskNote:
type: string
description: Optional note describing the task.
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: scheduleTask
description: Schedule a follow-up task related to the new deal.
operationId: create-task
parameters:
- name: Api-Token
in: header
value: $inputs.apiToken
requestBody:
contentType: application/json
payload:
dealTask:
relid: $steps.createDeal.outputs.dealId
duedate: $inputs.dueDate
dealTasktype: $inputs.dealTaskTypeId
note: $inputs.taskNote
successCriteria:
- condition: $statusCode == 201
outputs:
dealTaskId: $response.body#/dealTask/id
outputs:
dealId: $steps.createDeal.outputs.dealId
dealTaskId: $steps.scheduleTask.outputs.dealTaskId
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.