Peach
  1. webhooks
Peach
  • messaging
    • Send a pre-approved template message
      POST
    • Poll template message status
      GET
    • Launch a broadcast
      POST
    • Poll broadcast status
      GET
    • Poll template messages status
      GET
  • contacts
    • Create a contact on Peach
      POST
  • orders
    • Create an order
      POST
    • Find order by ID
      GET
    • Create a refund for an order
      POST
  • medias
    • List available medias
      GET
    • Add a media
      POST
    • Remove a media
      DELETE
  • webhooks
    • Order status webhooks
    • Flow execution status webhooks
    • Message delivery status webhooks
    • AI flow execution status webhooks
  1. webhooks

Flow execution status webhooks

Peach can trigger various webhooks as part of a WhatsApp Flow's (UI app's) execution life-cyle, if those have been configured from within Peach.
1.
flow_execution.pending - this is triggered when the app has been sent to the contact via a WhatsApp template message.
The webhook payload:
{
  "type": "flow_execution.pending",
  "data": {
    "id": "fe_1234abcd",
    "status": "created",
    "contact": {
      "id": 1,
      "account_id": 1,
      "name": "John Doe",
      "phone_number": "+919988776655",
      "first_name": "John",
      "last_name": "Doe",
      "country_code": "91",
      "language": "en",
      "email": "johndoe@example.com"
    },
    "flow": {
      "id": "flw_1234abcd",
      "name": "Sample app",
      "status": "published",
      "category": "other",
      "description": "This is a sample flow"
    },
    "submission": [],
    "responses": {},
    "account_id": 1,
    "context": {},
    "source": {}
  }
}
2.
flow_execution.in_progress - this is triggered when the UI app has been opened by the contact by clicking on the Flow button.
The webhook payload:
{
  "type": "flow_execution.in_progress",
  "data": {
    "id": "fe_1234abcd",
    "status": "created",
    "contact": {
      "id": 1,
      "account_id": 1,
      "name": "John Doe",
      "phone_number": "+919988776655",
      "first_name": "John",
      "last_name": "Doe",
      "country_code": "91",
      "language": "en",
      "email": "johndoe@example.com"
    },
    "flow": {
      "id": "flw_1234abcd",
      "name": "Sample app",
      "status": "published",
      "category": "other",
      "description": "This is a sample flow"
    },
    "submission": [],
    "responses": {},
    "account_id": 1,
    "context": {},
    "source": {}
  }
}
3.
flow_execution.completed - this is triggered when the app journey has been marked as completed, either by Peach or by a custom back-end.
The webhook payload:
{
  "type": "flow_execution.completed",
  "data": {
    "id": "fe_1234abcd",
    "status": "created",
    "contact": {
      "id": 1,
      "account_id": 1,
      "name": "John Doe",
      "phone_number": "+919988776655",
      "first_name": "John",
      "last_name": "Doe",
      "country_code": "91",
      "language": "en",
      "email": "johndoe@example.com"
    },
    "flow": {
      "id": "flw_1234abcd",
      "name": "Sample app",
      "status": "published",
      "category": "other",
      "description": "This is a sample flow"
    },
    "submission": [
      {
        "id": "fr_1234abcd",
        "key": "phone_number",
        "value": "+919988776655"
      },
      {
        "id": "fr_2345bcde",
        "key": "date_of_birth",
        "value": "21/01/1970"
      },
      {
        "id": "fr_3456cdef",
        "key": "loan_type",
        "value": "Auto Loan"
      }
    ],
    "responses": {
      "phone_number": "+919988776655",
      "date_of_birth": "21/01/1970",
      "loan_type": "Auto Loan"
    },
    "account_id": 1,
    "context": {},
    "source": {}
  }
}
Previous
Order status webhooks
Next
Message delivery status webhooks
Built with