Create Procedure Instances

In procedure instances, you replace the Adapter Instance and Value variables in the template with specific adapter instances and values. You can set up procedure instances to notify you of any errors through email or a webhook URL.

Create Procedure Instance

To create a procedure instance:

  1. Navigate to the Procedures page.
  2. Hover over the adapter card, and then click Create Instance.
  3. Enter a name for the instance.
  4. Specify the Adapter Instance and Value variables:
    • In the Variables section under Instances, select an Instance variable, and then choose or create an adapter instance to replace the variable.
    • In the Variables section under Values, enter a value to replace the variable. Variables
  5. To add email or webhook error notifications, click Show Advanced.
    • In Email enter a comma-separated list of email addresses.
    • In Webhook URL enter a comma-separated list of URLs.
  6. Click Create Instance.

You can create temporary procedure instances that exist for a specified amount of time. Specify the time in seconds, such as 86400 for a day or 3600 for an hour. Every hour, Sugar Integrate checks for temporary procedure instances that have expired and deletes them. You can create temporary procedure instances only through the Sugar Integrate APIs.

To create a temporary procedure instance, add "formula.instance.time.to.live": <seconds> to the settings object in a POST /formulas/{id}/instances request. Here's an example where the procedure instance expires after one hour:

 {
  "active": true,
  "configuration": {
    "<key>": "string"
  },
  "settings": {
    "notification.email": "string",
    "notification.webhook.url": "string",
    "api": "string",
    "formula.instance.time.to.live": 3600
  },
  "createdDate": "2018-01-23T16:33:47.431Z",
  "formula": {
    "active": true,
    "id": 0
  },
  "name": "string",
  "updatedDate": "2018-01-23T16:33:47.431Z"
}

Deactivate a Procedure Instance

You can deactivate a procedure to temporarily stop executions until you reactivate it.

Note: You can also deactivate a procedure template to stop the executions of all procedure instances. See Deactivate a Procedure Template.

To deactivate a procedure instance:

  1. Navigate to the Procedure instance. On the Procedures page, hover over the Procedure card, and then click on the Instances banner.
  2. Hover over the Procedure Instance card, and then click Edit.
  3. At the top right of the page, switch the Active slider off.

 Active

Review Executions

You can troubleshoot procedures instances or review successful executions. The executions appear in three columns from left to right:

  • Procedure Executions — the list of executions of the selected procedure instance. We identify failed executions in red.
  • Steps —The steps in the procedure instance and an icon showing their success Success or failure Failure.
  • Execution Values —The details associated with the selected step.

To review procedure instance executions:

  1. Navigate to the Procedure instance. On the Procedures page, hover over the procedure card, and then click on the Instances banner.
  2. Hover over the Procedure Instance card, and then click Executions.
  3. Click the execution to review.
  4. Click the step to review.

Delete a Procedure Instance

To delete a procedure instance:

  1. Navigate to the Procedure instance. On the Procedures page, hover over the Procedure card, and then click on the Instances banner.
  2. Hover over the Procedure Instance card, and then click Delete.
  3. Confirm the deletion.

Edit a Procedure Instance

You can update the following information in a procedure instances:

  • Name
  • Variables
  • Notifications

Tip: Quickly see all of your procedure instances in one place on the Instances page.

To edit a procedure variable:

  1. Navigate to the Procedure instance. On the Procedures page, hover over the Procedure card, and then click on the Instances banner.
  2. Hover over the Procedure Instance card, and then click Edit.
    • To edit the name, a Value variable, or any notifications, make your changes, and then click Update.
    • To edit an Adapter Instance variable, click the pencil icon, and then select a new adapter instance. Click Update.

Find a Procedure Instance ID

The Procedure Instance ID is a unique identifier for each procedure instance. You can see the procedure ID on a procedure instance card under the title or on the Instances page.

Formula Instance IDInstances page ID