Integrations · AiSensy

AiSensy + AI voice calls: WhatsApp the leads your agent couldn't reach

Use AiSensy for WhatsApp and Vyora for AI calling? Connect them in about 15 minutes. When a Vyora agent calls a lead and nobody picks up, an AiSensy API Campaign sends your approved template from your WhatsApp number, tags the contact in AiSensy, and your team picks up the reply in the AiSensy inbox.

What you need

  • — An AiSensy account with the WhatsApp Business API connected.
  • — A Meta-approved template, and an AiSensy API Campaign set Live for it.
  • — A Vyora Business plan (Workflows). On another plan, see the webhook route on the WhatsApp integrations page.
01

Set it up

  1. 01

    Create and approve the template in AiSensy

    In AiSensy, create the WhatsApp template you want leads to receive and wait for Meta approval.
  2. 02

    Launch an API Campaign for it

    Campaigns → Launch → API Campaign. Name it, pick the approved template and set it Live.
  3. 03

    Copy your API key

    In AiSensy go to Developer → API Campaign key and copy the key.
  4. 04

    Add the step in a Vyora Workflow

    After the Call (and an If / else "They didn't answer", if you only want missed calls), add "Send to another app" with AiSensy's address and the JSON body.
  5. 05

    Test with your own number, then publish

    Run a test, let the call ring out, and check the run log reads "Sent to backend.aisensy.com (200)".
02

The request Vyora sends to AiSensy

In the "Send to another app" step, fill in these three fields. AiSensy needs no extra header: the key travels in the body.

Method
POST
Address
https://backend.aisensy.com/campaign/t1/api/v2
Headers
none

What to send (JSON)

{
  "apiKey": "YOUR_AISENSY_API_KEY",
  "campaignName": "missed_call_followup",
  "destination": "{{callee_number}}",
  "userName": "{{callee_name}}",
  "source": "Vyora AI call",
  "templateParams": ["{{callee_name}}"],
  "tags": ["missed-ai-call"]
}

Replace missed_call_followup with your API Campaign's exact name (not the template name) and paste your key. source and tags are optional; the tag must already exist in your AiSensy project or AiSensy ignores it.

03

Mapping template variables

AiSensy fills a template's variables in order from templateParams: the first value goes into {{1}}, the second into {{2}}, and so on. The list must have exactly as many values as the template has variables, or AiSensy rejects the whole request.

Template
templateParams
Result
Hi {{1}}, we just tried calling you.
["{{callee_name}}"]
Hi Priya, we just tried calling you.
Hi {{1}}, your visit in {{2}} is noted.
["{{callee_name}}", "{{answer.preferred_location}}"]
Hi Priya, your visit in Gomti Nagar is noted.

{{answer.<field>}} values come from the agent's Post-Call Analysis, so they exist only after a call that connected. For a missed-call template, stick to the name and fields from your contact list.

04

After the call that connected: send a brochure

A second branch (If / else "They answered") can send a document template with what the lead told the agent. Use a separate AiSensy API Campaign whose template has a document header, and add a public file URL.

{
  "apiKey": "YOUR_AISENSY_API_KEY",
  "campaignName": "site_visit_brochure",
  "destination": "{{callee_number}}",
  "userName": "{{callee_name}}",
  "templateParams": ["{{callee_name}}", "{{answer.preferred_location}}"],
  "media": {
    "url": "https://example.com/brochures/green-meadows.pdf",
    "filename": "Green-Meadows-brochure.pdf"
  },
  "attributes": { "budget": "{{answer.budget}}" }
}

attributes writes the lead's answer onto the AiSensy contact (the attribute must already exist in the project and values must be text), so you can build AiSensy segments on what was said on the call.

05

Test it and read the run log

Click Test in the workflow, enter your own name and number, and don't answer. Open Runs: the step's line shows what AiSensy replied.

Run log says
Fix
Sent to backend.aisensy.com (200)
AiSensy accepted it. If WhatsApp doesn't arrive, open the API Campaign's report in AiSensy for the delivery status.
backend.aisensy.com refused it (4xx)
Check in this order: campaign name exact and Live, templateParams count matches the template, media URL public, API key current (copy it again from Developer → API Campaign key).
backend.aisensy.com didn't answer within 15 seconds
AiSensy was slow. The workflow continues; that contact's message is not retried.
06

Frequently asked questions

Do I need a separate AiSensy API Campaign for each template?

Yes. An AiSensy API Campaign is tied to one approved template, and the request names the campaign, not the template. For a missed-call message and a post-call brochure, create two API Campaigns and use two "Send to another app" steps.

What phone format does AiSensy need from Vyora?

AiSensy's destination field takes the number with the country code, like +919876543210. Vyora's {{callee_number}} field is already in that format, so you can use it unchanged.

Will leads who get the message show up as contacts in AiSensy?

Yes. If the number is not already a contact, AiSensy creates one from the request, using the userName you send. Tags and attributes in the same request are applied to it, as long as they already exist in your AiSensy project.

Can I send a PDF or image with the template?

Yes, if the template has a media header. Add a media object with a public URL and a file name, for example your project brochure. AiSensy rejects the request if the URL is not publicly reachable.

Is there a Vyora fee for the AiSensy integration?

No separate fee. The "Send to another app" step is part of Workflows on Vyora's Business plan. AiSensy bills the WhatsApp conversation on your AiSensy account as usual.

Related

We use cookies to improve your experience. By continuing to use this site, you agree to our Privacy Policy.