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

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":  {
             		"appointment":{
                    "approval_mode": null,
                    "auto_follow_up_hours": 0,
                    "business_uid": "4a052846de6bc85c",
                    "category_name": null,
                    "charge_type": "no_price",
                    "client_color_id": 8,
                    "client_first_name": "Casie",
                    "client_uid": "b8xl3dbs3g8n0w0t",
                    "client_last_name": "Renner",
                    "conversation_uid": "peuu6o8xz4jynmux",
                    "coupon": null,
                    "currency": null,
                    "duration": 30,
                    "end_time": "2025-02-03T09:30:00.000+02:00",
                    "follow_up_data": null,
                    "follow_up_note": "",
                    "follow_up_time": null,
                    "follow_up_type": null,
                    "future_bookings_limit": 0,
                    "id": "grxekbs917789pk5",
                    "image_url": "",
                    "initiator": null,
                    "interaction_details": "quod",
                    "interaction_type": "client_location",
                    "invoices": [],
                    "is_recurring": false,
                    "last_action_message": null,
                    "linked_booking_uid": null,
                    "meeting_reminder_sms_1": false,
                    "meeting_reminder_sms_2": false,
                    "min_hours_before_meeting": 0,
                    "no_show": false,
                    "notes": null,
                    "optional_times": [],
                    "payment": null,
                    "payment_uid": null,
                    "payment_status": null,
                    "price": "0.0",
                    "remind_before_in_hours_1": 0.25,
                    "remind_before_in_hours_2": 0,
                    "request_data": null,
                    "series_id": null,
                    "series_instance_count": null,
                    "service_uid": "n50cf83s3ogo3ggp",
                    "sms_booking_confirmation": null,
                    "source_data": {
                      "campaign": null,
                      "channel": null,
                      "id": 57,
                      "name": "initiated_by_staff",
                      "website_url": null
                    },
                    "staff_display_name": "Rosa Spinka",
                    "staff_uid": "9a20a295c274f89a",
                    "staff_image": null,
                    "start_time": "2025-02-03T09:00:00.000+02:00",
                    "state": "scheduled",
                    "title": "Reactive responsive definition",
                    "type": "appointment",
                    "zoom_start_url": null
                  }
             	},
  "evidence": ["User asked for price estimate"]
  "confidence": 0.85
}

Payload Properties

NameDescriptionTypeExample

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
}