AIRecommendedAction

Entity description

An AIRecommendedAction entity represents a recommended action based on AI analysis. It provides contextual insights and justifications for decision-making, along with confidence scoring.

Properties

NameDescriptionTypeExample
uidA unique identifier for the recommended actionstringact-456
actionThe type of action recommended (reply, estimate, schedule)stringreply
displayContains display-related information for the recommendationobjectSee Display Properties below
reasonThe reason why this action is recommended, providing context for decision-makingstringUser needs clarification on pricing
payloadAdditional data related to the recommended action. The structure depends on the action typeobject{}
evidenceA list of supporting statements or facts justifying the recommendationarray["User asked for price estimate"]

Display Properties

NameDescriptionTypeExample
titleA human-readable title describing the actionstringFollow up with the client
descriptionA human-readable description of the actionstringThe recommended time for an appointment is Monday 5th of March. Click "Auto-fill" to apply
btn_textThe text on the buttonstringThe text that should appear on the button for recommendation "Ask for more details"

Possible payloads

Reply

Payload example

{
  "uid": "act-456",
  "action": "reply",
  "display": {
    "btn_text": "Generate Reply"
  },
  "reason": "User needs clarification on pricing",
  "payload":  {
             		"email_message":"I need more details to send you a quote<br/>best regards,<br/>ramster",
    						"sms_message":"I need more details to send you a quot"
             	,
  "FB_message":"I need more details to send you a quot"
             	},
  "other_message":"I need more details to send you a quot"
             	}
  "evidence": ["User asked for price estimate"]
}

Payload Properties

NameDescriptionTypeExample
email_messageText to be used for email textstring
sms_messageText to be used for smsstring
FB_messageText to be used for Facebookstring
other_messageText to be used as fallback for other channelsstring

Schedule

Payload example

{
  "uid": "act-456",
  "action": "schedule",
  "display": {
    "btn_text": "Schedule an Appointment"
  },
  "reason": "User asked for an appointment at 6PM",
    "payload": {
    "client_availability": [
      {
        "start_time": "2025-02-05T09:00:00+01:00",
        "end_time": "2025-02-05T17:00:00+01:00"
      }
    ],
    "recommended_start_time": "2025-02-05T12:00:00+01:00",
    "service_name": "Primera Sesión Gratuita",
    "duration": 30,
    "service_id": "6870531"
  },
    "evidence": ["User asked for price estimate"],
    "confidence": 0.85
  }
}

Below is a sample Markdown documentation for the provided JSON structure.


{
  "payload": {
    "client_availability": [
      {
        "start_time": "2025-02-05T09:00:00+01:00",
        "end_time": "2025-02-05T17:00:00+01:00"
      }
    ],
    "recommended_start_time": "2025-02-05T12:00:00+01:00",
    "service_name": "Primera Sesión Gratuita",
    "duration": 30,
    "service_id": "6870531",
    "business_timezone":"Asia"
  },
  "evidence": ["User asked for price estimate"],
  "confidence": 0.85
}

Payload Properties

NameDescriptionTypeExample
client_availabilityList of intervals indicating the client’s availability.Array of objects[ { "start_time": "2025-02-05T09:00:00+01:00", "end_time": "2025-02-05T17:00:00+01:00" } ]
client_availability[].start_timeStart time (ISO 8601) for a client availability window.String"2025-02-05T09:00:00+01:00"
client_availability[].end_timeEnd time (ISO 8601) for a client availability window.String"2025-02-05T17:00:00+01:00"
recommended_start_timeRecommended start time for the service (ISO 8601).String"2025-02-05T12:00:00+01:00"
service_nameName of the service being recommended.String"Primera Sesión Gratuita"
durationDuration of the service in minutes.Integer30
service_uidUnique identifier for the service.String"6870531"
business_timezoneThe business's timezonestring"Asia"

Note:

  • ISO 8601 format commonly includes the date, time, and time zone (e.g., YYYY-MM-DDTHH:mm:ss±HH:mm).
  • The confidence field indicates how confident the system is about the recommendation (1.0 being highest).

Estimate

Payload example

{
  "uid": "act-456",
  "action": "estimate",
  "display": {
    "btn_text": "Generate an estimate"
  },
  "reason": "User asked for an estimate to clean her carpet",
  "evidence": ["I want a price estimate for carpet cleaning"],
  "payload": {
    "estimate": {
      "header": "New Estimate for service",
      "purchase_order": "PO123",
      "items": [
        {
          "itemizable_subject_type": "Service",
          "itemizable_subject_uid": "service-123",
          "name": "service with taxes",
          "rate": 22,
          "quantity": 2,
          "taxes": [
            {"name": "VAT", "rate": 10}
          ]
        },
        {
          "itemizable_subject_type": "Product",
          "itemizable_subject_uid": "product-123",
          "name": "product",
          "rate": 10,
          "quantity": 2,
          "taxes": [
            {"name": "VAT", "rate": 10}
          ]
        },
        {
          "name": "Custom Item",
          "description": "Custom Item Description",
          "rate": 100,
          "quantity": 2,
        }
      ],
      "notes": "This is a note for the estimate",
      "metadata": {
        "display_sections_total": true,
        "display_items_total": false
      }
    }
  }
}

Payload Properties

NameDescriptionTypeExample

Estimate, Missing Details

{
  "uid": "act-456",
  "action": "estimate_missing_details",
  "display": {
    "btn_text": "Ask for more details"
  },
  "reason": "Not enough data to generate a reliable estimate",
  "payload":  {
             		"estimate":{
                    "estimate_date": "2020-04-20",
                    "due_date": "2020-04-24",
                    "client_uid": "1kfvtps4a4wlh3lc",
                    "client_name": "Alice Smith",
                    "client_address": "Lombard St, San Francisco, CA",
                    "address": "habarzel 32\nTel Aviv",
                    "amount": 8.8,
                    "currency": "USD",
                    "status": "draft",
                    "items": [
                      {
                        "title": "Item title",
                        "description": "Service Description",
                        "quantity": 1,
                        "amount": 10,
                        "discount": 2,
                        "taxes": [
                          {
                            "name": "10 tax",
                            "rate": 10
                          }
                        ]
                      }
                    ],
                    "note": "Estimate for your service",
                    "source_data": {
                      "campaign": null,
                      "channel": "",
                      "name": "client_portal",
                      "website_url": null
                    },
                    "staff_uid": "mg9d34uh92bclwzg",
                    "title": "Estimate title"
                  }
             	},
  "evidence": ["I want a price estimate for carpet cleaning"],
  "confidence": 0.85
}