Invoke points contain Inputs to trigger code points in when undirected fill runs. Invoke points can also pass attributes, which are present within code points as global variables.

Example

Invoke point

{
  "name": "customer_cohorts",
  "organization_id": "org_6595cb88cef61bf614830d14",
  "inputs": {
    "order_history": {
      "evaluate": true
    }
  },
  "outputs": [],
  "partition": "retail-cohorts",
  "code": "procedure_point",
  "attributes": {
    "instructions": "You are an expert Customer Service Agent.  \n## Purpose\nAssign customer cohorts based on order history.\n## Instructions\nπŸ€–πŸ˜€ _Steps to be followed by AI and human Agents._\n\n### Step 1 - Review Order History  \nAnalyze the customer's order history found in the Appendix.\n\n### Step 2 - Assign Customer Cohorts\nFollowing are the rules for assigning customer cohorts based on order history. Choose all rules that apply to this customer based on their order history.\n- `customer`: All customers who have placed at least one order.\n- `repeat_customer`: All customers who have placed more than one order.\n- `frequent_customer`: All customers who have placed more than 5 orders within the past 12 months, Use 2024-01-15 as the current date.\n- `loyal_customer`: All customers who have placed more than 10 orders within the past 12 months, Use 2024-01-15  as the current date.\n- `inactive_customer`: All customers who have not placed an order within the past 12 months, Use 2024-01-15  as the current date.\n- `new_customer`: All customers who have placed their first order within the past 12 months, Use 2024-01-15  as the current date.\n- `high_value_customer`: All customers who have placed an order with a total value greater than $1000.\n- `high_average_order_value`: All customers who have placed an order with an average order value greater than $200.\n## AI Only Instructions  \nπŸ€– _Steps to be followed by AI Agents only._\n\n### Step 3 - Generate JSON Response  \nCreate a JSON object with the following:\n  - `customer`: Top level key, which includes:\n    - `member_of`: An array of the options that apply to the customer. For example, if the customer is a repeat customer and a frequent customer, the value would be ['repeat_customer', 'frequent_customer'].\n\nFinally prepare a paragraph containing no more than 100 characters providing a factual summary of all the key values presented that can be reviewed by a CS Agent for confirmation. Exclude justifications and assumptions for clarity and accuracy. This paragraph should be added to the JSON output with the key \"summary\".\n\n#### Example format:\n```json\n{\n  \"customer\": {\n    \"member_of\": [\"repeat_customer\", \"frequent_customer\"]\n  },\n  \"summary\": \"Customer is repeat, frequent, loyal, and high value.\"\n}\n\n```\n### Step 4 - Apply Overrides  \nIf present, apply instruction overrides found in Appendix.\n\n## Appendix\n### Order History  \n[[order_history]]\n### Instruction Overrides  \nAlter instructions with any feedback provided here:  ",
    "friendly_name": "Assign customer cohorts",
    "description": "Calculate customer cohorts based on order history.",
    "run_type": "support"
  },
  "tags": [
    "retail-cohorts"
  ]
}

Highlighted Keys

  • inputs : An object of paths with evaluations that define when the invoke point is triggered.

    E.g. "inputs": { "order_history": { "evaluate": true } }

  • partition : A string used to segment when a point should be activated.

    E.g. "partition": "post_processing

  • code : The code point that will be run when the invoke is triggered.

    E.g. "code": "procedure_point"

  • attributes : An object of key value pairs that will be passed to code points as global parameters.

    E.g. "attributes": { "instructions": instructions, "friendly_name": "Assign customer cohorts", "description": "Calculate customer cohorts based on order history.", "run_type" : "support" }

Fill Triggers

Invoke points are triggered when their input conditions are met.

Taskless Invokes

Invokes can optionally be triggered without undirected fill via taskless triggers. These are useful for scheduled tasks or portal quick links.

To enable an invoke to be triggered without undirected fill, add "allow_taskless": true to the root of the invoke. To enable the invoke as a portal quick link, additionally add "is_quicklink": true to the root of the invoke.

Example

Invoke that can be triggered without undirected fill and is a portal quick link

{
  "inputs": {
    "task.intent": {
      "evaluate": "[manage_points]"
    }
  },
  "outputs": [],
  "partition": "taskless",
  "code": "taskless_webhook_assign",
  "description": "Create a new Point",
  "attributes": {
    "friendly_name": "Create a Point",
    "description": "Create a new Point",
    "instructions": "Create a new Point",
    "task_type": "expert",
    "id_name": "manage_points",
    "data": {
      "task": {
        "intent": "manage_points",
        "action": "create"
      }
    }
  },
  "tags": [],
  "allow_taskless": true,
  "is_quicklink": true
}

What’s Next