How to integrate with the POST_CALL_OUTCOME webhook.
POST_CALL_OUTCOME
webhook is an integral feature for building call processing workflows around Air’s conversational AI phone calls. When a call is completed and the prospect did answer the phone, a POST request with detailed information about the call is sent to the configured URL. If the call goes to voicemail or cannot be completed, no event will be sent to the webhook.
POST_CALL_OUTCOME
and POST_CALL_DATA
call
object in the webhook payload contains several properties that provide detailed information about the AI phone call. Here’s a breakdown of each property:
sid
: A unique identifier for the call session, used internally for tracking and referencing the call.llmAnsweredBy
: Specifies how the call was answered. The value “human” indicates that a person responded to the call. “human” is the only value that will come over with this property.promptId
: The identifier for the AI script or prompt used during the call, which corresponds to the id of your agent.callRecordingUrl
: The URL to access the recording of the call. This is useful for playback and analysis purposes.fromNumber
: The phone number from which Air initiated the call.toNumber
: The recipient’s phone number, i.e., the prospect who was called.direction
: Describes the direction of the call. “outbound-api” indicates an outgoing call.duration
: Length of the call in seconds.campaignId
: An identifier for the campaign that initiated this call, if applicable. A value of null
means the call was instead initiated through the API or a roleplay.cachedLeadName
: The name of the lead/prospect that the call was initiated with.transcript
: The verbatim transcript of the dialogue between the Agent (BOT) and the human participant.createdAt
: The timestamp marking when the call record was created in the system, which is the time the call was initiated.leadData
: Any additional data about the lead. It’s null
in this example, indicating there is no extra data or it’s not relevant for this particular call. Any metadata you initiate the call with will appear in this property.notes
: Notes generated by AI that summarizes the call. You can customize the prompt used to generate these notes within the “Post Call Notes” section inside the agent editor.outcome
: The outcome of the call, determined by AI by following the prompts setup in your agent under “Setup Stats Tracking”.primaryOutcomeAchieved
: A boolean (true/false) response to whether or not the PRIMARY outcome for the agent was achieved.POST_CALL_OUTCOME
webhook, contact our support team at support@air.ai.