Custom integration step

  • Certain Workflows in Productiv may be configured with a custom integration step. If the custom integration step is available for the workflow you are building, you will be able to drag it in as a step in the workflow. The custom integration step involves a request being sent to an HTTPS endpoint you can configure, when the step is reached in the workflow

  • After the HTTPS request is sent out, the custom integration step may be configured to explicitly wait until it's told to resume, or fire the request to the configured endpoint and move to the next step immediately. If you want the custom integration step to wait until it's told to resume the workflow, configure "Wait for callback" as "Yes". When configured to "Yes", the workflow will wait to resume until the Resume Workflow API is called. If configured with "No", the workflow will automatically move to the next step once the HTTP request is sent.

  • We have also created pre-configured Zapier templates that will help you get started with the custom integration.

POST https://your-configured-endpoint.com

The body contents depend on the type of workflow that was run. Schema for each workflow type is described below:

Request Body Schemas

App Renewal Workflow

{
  "Timestamp": number,
  "CallbackToken": string,
  "Metadata": {
    "Workflow": {
      "Id": string,
      "RunId": string,
      "Name": string,
      "Type": string,
      "StartTimestamp": number
    },
    "Application": {
      "Name": string,
      "Id": string
    }
  },
  "Contracts": {
    "Summary": {
      "StartDate": string,
      "EndDate": string,
      "TermAmount": {
        "Amount": number,
        "Currency": string
      },
      "AutoRenews": boolean,
      "Units": number,
    },
    "Details": [
      {
        "ContractId": string,
        "StartDate": string,
        "EndDate": string,
        "TermMonths": number,
        "AutoRenews": boolean,
        "AutoRenewalCancellationPeriodDays": number,
        "TermAmount": {
          "Amount": number,
          "Currency": string,
        },
        "AnnualAmount": {
          "Amount": number,
          "Currency": string,
        },
        "Payment": {
          "Frequency": string,
          "Terms": string
        },
        "Buyer": {
          "Name": string,
          "Email": string,
          "Address": string
        },
        "Supplier": {
          "Name": string,
          "Email": string,
          "Address": string
        },
        "LineItems": [
          {
            "LicenseType": string,
            "Description": string,
            "StartDate": string,
            "EndDate": string,
            "TermMonths": number,
            "Units": number,
            "TermAmount": {
              "Amount": number,
              "Currency": string
            },
            "AnnualCostPerUnit": {
              "Amount": number,
              "Currency": string
            },
          }
        ]
      }
    ]
  },
  "RenewalProposal": {
    "Summary": {
      "StartDate": string,
      "EndDate": string,
      "TermMonths": number,
      "TermAmount": {
        "Amount": number,
        "Currency": string
      }
    },
    "LineItems": [
      {
        "AutoRenews": boolean,
        "LicenseType": string,
        "EndDate": string,
        "StartDate": string,
        "TermMonths": number,
        "Description": string,
        "TermAmount": {
          "Amount": number,
          "Currency": string
        },
        "Units": number,
        "AnnualCostPerUnit": {
          "Amount": number,
          "Currency": string
        }
      }
    ]
  },
  "Attachments": [
    {
      "Filename": string,
      "Url": string
    }
  ]
}

The schema is described in detail below.

Property Datatype Description Optional
Timestamp number Unix timestamp in milliseconds of the event. No
CallbackToken string Callback token for use with the resume workflow endpoint No
Metadata object See Metadata object below No
Contracts object See WorkflowContracts object below No
RenewalProposal object Details about the renewal proposal. See RenewalProposal object below No
Attachments array Documents associated with the workflow. See Attachments object below No

Objects

Metadata
Property Datatype Description Optional
Workflow object See WorkflowMetadata object below No
Application object See ApplicationMetadata object below No
WorkflowMetadata
Property Datatype Description Optional
Id string Unique identifier for the workflow No
RunId string Unique identifier for the workflow run No
Name string Name of the workflow No
Type string Workflow type. "APP_RENEWAL" for app renewal workflows No
StartTimestamp number Unix timestamp in milliseconds of when the workflow started running No
ApplicationMetadata
Property Datatype Description Optional
Id string Unique identifier for the application No
Name string Application name No
Contracts
Property Datatype Description Optional
Summary object Overall summary across all contracts. See ContractSummary below No
Details array List of ContractDetail objects with details about each contract. No
ContractSummary
Property Datatype Description Optional
StartDate string Contract start date, in YYYY-MM-DD format. For multiple contracts, the earliest start date. No
EndDate string Contract end date, in YYYY-MM-DD format. For multiple contracts, the latest end date. No
TermAmount object Total cost of all contracts, see Cost object below No
AutoRenews boolean Whether the contract autorenews. True if at least one contract autorenews. No
Units number Total number of units purchased across all contracts No
ContractDetail
Property Datatype Description Optional
ContractId string Identifier for the contract, unique for an app No
StartDate string Contract start date, in YYYY-MM-DD format No
EndDate string Contract end date, in YYYY-MM-DD format No
TermMonths number Contract term in months No
TermAmount object Total cost of the contract, see Cost object below No
AnnualAmount object Annual cost of the contract, see Cost object below No
AutoRenews boolean Whether the contract autorenews. No
AutoRenewCancellationPeriodDays number Contract cancellation notice period in days Yes
Units number Total number of units purchased No
Buyer object See Buyer object below Yes
Supplier object See Supplier object below Yes
Payment object See Payment object below Yes
LineItems array List of LineItem objects. No
RenewalProposal
Property Datatype Description Optional
Summary object See RenewalProposalSummary object below No
LineItems array List of LineItem objects No
RenewalProposalSummary
Property Datatype Description Optional
StartDate string Contract start date, in YYYY-MM-DD format. For multiple line items, the earliest start date. No
EndDate string Contract end date, in YYYY-MM-DD format. For multiple line items, the latest end date. No
TermAmount object Total cost of all line items, see Cost object below No
TermMonths number Contract term in months No
Buyer
Property Datatype Description Optional
Name string Buyer name Yes
Email string Buyer email Yes
Address string Buyer address Yes
Supplier
Property Datatype Description Optional
Name string Supplier name Yes
Email string Supplier email Yes
Address string Supplier address Yes
Payment
Property Datatype Description Optional
Term string Payment terms No
Frequency string Payment frequency e.g. annual, quarterly etc. No
LineItem
Property Datatype Description Optional
AutoRenews boolean Whether the line item auto-renews No
LicenseType string Type of license, can be one of "User", "NonUser" No
Description string Line item description No
StartDate string Line item start date, in YYYY-MM-DD format No
EndDate string Line item end date, in YYYY-MM-DD format No
TermMonths number Line item term in months No
TermAmount object Total cost of the line item, see Cost object below No
Units number Number of units purchased for this line item No
AnnualCostPerUnit object Annual cost per unit for this line item, see Cost object below No
Cost
Parameter Datatype Description
Amount number Numerical value of the cost
Currency string Currency code e.g. USD, GBP etc.
Attachments
Property Datatype Description Optional
Filename string Name of the file No
Url string Content Url of the file - time-limited URL set to expire in 5 days. Please download the file before the expiration No

App Review Workflow

{
  "Timestamp": number,
  "CallbackToken": string,
  "Metadata": {
    "Workflow": {
      "Id": string,
      "RunId": string,
      "Name": string,
      "Type": string,
      "StartTimestamp": number
    },
    "Application": {
      "Name": string,
      "Id": string
    }
  },
  "Attachments": [
    {
      "Filename": string,
      "Url": string
    }
  ]
}

The schema is described in detail below.

Property Datatype Description Optional
Timestamp number Unix timestamp in milliseconds of the event. No
CallbackToken string Callback token for use with the resume workflow endpoint No
Metadata object See Metadata object below No
Attachments array Documents associated with the workflow. See Attachments object below No

Objects

Metadata
Property Datatype Description Optional
Workflow object See WorkflowMetadata object below No
Application object See ApplicationMetadata object below No
WorkflowMetadata
Property Datatype Description Optional
Id string Unique identifier for the workflow No
RunId string Unique identifier for the workflow run No
Name string Name of the workflow No
Type string Workflow type. "APP_REVIEW" for app review workflows No
StartTimestamp number Unix timestamp in milliseconds of when the workflow started running No
ApplicationMetadata
Property Datatype Description Optional
Id string Unique identifier for the application No
Name string Application name No
Attachments
Property Datatype Description Optional
Filename string Name of the file No
Url string Content Url of the file - time-limited URL set to expire in 5 days. Please download the file before the expiration No

Software Intake / General Purchase Workflow

{
    "Timestamp": number,
    "CallbackToken": string,
    "Metadata": {
        "Workflow": {
            "Id": string,
            "RunId": string,
            "Name": string,
            "Type": string,
            "StartTimestamp": number
        },
    },
    "RequestForm": {
        ["FieldId"]: {
            "FieldLabel": string,
            "FieldValue": any
        }
    },
    "Attachments": [
        {
            "Filename": string,
            "Url": string
        }
    ]
}

The schema is described in detail below.

Property Datatype Description Optional
Timestamp number Unix timestamp in milliseconds of the event. No
CallbackToken string Callback token for use with the resume workflow endpoint No
Metadata object See Metadata object below No
RequestForm object See RequestFormById object below No
Attachments array Documents associated with the workflow. See Attachments object below Yes

Objects

Metadata
Property Datatype Description Optional
Workflow object See WorkflowMetadata object below No
WorkflowMetadata
Property Datatype Description Optional
Id string Unique identifier for the workflow No
RunId string Unique identifier for the workflow run No
Name string Name of the workflow No
Type string Workflow type. "SOFTWARE_INTAKE" for software intake workflows No
StartTimestamp number Unix timestamp in milliseconds of when the workflow started running No
RequestFormById
Property Datatype Description Optional
[FieldId] object See RequestFormField object below, the object is keyed by the field ID e.g. "application", "vendor" etc. No
RequestFormField
Property Datatype Description Optional
FieldLabel string Label for the form field e.g. "Software/App name", "Expected cost of purchase" etc. Yes
FieldValue any Value for the form field as submitted by the user. Yes
Attachments
Property Datatype Description Optional
Filename string Name of the file Yes
Url string Content Url of the file - time-limited URL set to expire in 5 days. Please download the file before the expiration Yes