Trigger duplicate leads merge action

When leads created via API create duplicates in your account,  you can automatically merge those duplicate leads through Triggers.

Setting the Trigger duplicate leads merge action

The trigger actions get executed based on a certain event that you select when you’re in the triggers feature:

  • Select the event that will cause the trigger to fire.
    • e.g. Lead created via API

  • Under Actions, click “+ add another action”
  • Select from the actions drop-down:

[Lead merge] Merge new lead into existing duplicate

Trigger duplicate leads merge action

  • And indicate the merge method (email/phone).

  • This automatically merges new leads by ‘phone’ or ’email’ if ‘Lead created via API’ option was selected as the desired event.

Good to know:

If it happened that a lead with the same email or phone was sent via API and did not show in aNinja, neither as a new lead, nor merged; you want to make sure that the below Global settings rule is NOT enabled:

Do not add new Leads via API if Lead with similar email already exists (avoids duplicates)

The logic of the duplicates merging is to have two leads with similar emails or numbers saved in aNinja, and the system automatically merges them. The above rule does not allow the creation of a duplicate lead, hence the merging will not happen.

  • You can also indicate if this action should stop executing all subsequent actions/triggers in case the new lead has been merged. This is helpful if you don’t want a specific sequence to fire off for already existing leads.

  • With that said, it would be better if you set the trigger using this action with a high priority number so that it gets fired first.

Trigger “Incoming Call” event

Through aNinja Triggers, you can configure automatically firing a trigger action to handle a trigger event like “Incoming call”.

If you missed a call from a lead, or your line was busy, or even if you answered his call, you might want to send them an automation to honor their call.

Setting a trigger event to handle an incoming call

  • On the left sidebar, click on Automations > Triggers
  • Hit + Add Trigger
  • In the Trigger Event:
    • Choose “Incoming Call”.
    • From the dropdown, specify the type of the call:
      • Missed Call
      • Completed
      • Busy

trigger incoming call event

  • In the Trigger Action:
    • Set the trigger action you want to fire in response to the type of call.
    • You can add multiple actions to be executed when the event takes place.
Example 1:
  • On an event that is “Incoming call”
      • Call type: “Missed call”
  • Choose to execute an action to “[Lead assignment] Assign to User”.

This allows you to assign a user to follow up with the lead after missing his call and send him a text to honor his call.

Example 2:
  • On an event that is “Incoming call”
      • Call type: “Complete”
  • Choose to execute a first action to “[Sequence > Text] Start Text Sequence”
  • Choose to execute a second action to [Workflow Step Status] Update Workflow Step Status.

This way, after completing a call with a lead, you can send him a thank you message, and update his workflow status to “Contacted” for example.

 

Handle “Outgoing SMS with error code” through Triggers

aNinja allows you to automatically handle the outgoing SMS with an error code through Triggers. You can set a trigger action to set those leads as “do not contact”.

SMS with Error code

When you attempt to send a text through aNinja, the system uses the primary phone number saved in the lead contacts to send your text.

If the phone number saved in the lead contacts is wrong, landline, or blocked by the carrier, your sent SMS will return with an error code.

Setting a trigger to automatically mark leads as “do not contact”

You can configure automatically marking a lead as “do not contact” and handle outgoing SMS with an error code through triggers. You don’t want to keep on sending texts to an invalid phone number.

  • On the left sidebar, click on Automations > Triggers
  • Hit + Add Trigger
  • In the Trigger Event:
    • Choose “Outgoing SMS with error code
    • From the dropdown, choose the error message you want to execute the trigger action.handle incoming SMS with error code
  • In the Trigger Action:

Set “Add all lead contacts to do not contact list

Regarding the leads that that were added to the “do not contact” list, they do get included in the bulk sequence, but their texts get blocked from our side so it doesn’t get actually sent.
You can check them by clicking on the blocked leads count in ‘Bulk Sequences’ widget.

Also, set “Break after Trigger executes” to YES / true so that no other triggers execute after this match on that Lead.

It’s good to give this trigger a high priority level (e.g. 100). This indicates which trigger should be processed first.

Trigger Email action after a Delay duration

In this article, we’re going to show you how to set the trigger action to send lead info to an email address, after a delay that you define when a certain event has occurred.

Through aNinja Triggers, you can define which actions to programmatically trigger based on a specific event and condition. 

Setting the trigger Email action after a Delay

The trigger actions get executed based on a certain event that you select when you’re in the triggers feature:

  • Select the event that will cause the trigger to fire.
    • e.g. Lead created via Chatbot
  • Under Actions, click “+ add another action”
  • To set a delay before executing the trigger action, select from the action drop-down:

[Delay] Set delay duration in minutes for triggering event actions

  • And set the duration in minutes to a maximum of 5 minutes.Trigger Email action after a Delay
  • Click “+add another action
  • To set the trigger to send the lead info to an email, select from the actions drop-down:

[Email] Send lead info to an email address (from: no-reply@aninja.com)

  • And indicate the email address to send to.
  • The delay action is useful in the case for example of a lead created via chatbot, to wait a few minutes as they’re still filling the chatbot info (email, phone, etc.) so that the data is available when the lead’s info is forwarded to the email.

Trigger Webhook action – Posting lead details into URL

aNinja Triggers allow you to programmatically trigger actions based on specific events and conditions. In this article, we’re going to show you how to use the Trigger Webhook action.

Setting the Webhook action

Webhook action gets executed based on a certain event that you select when you’re in the triggers feature:

  • Select the event that will cause the trigger to fire.
    • e.g. Lead created via Chatbot

  • From the actions drop-down, choose

[Webhook] Post lead details to URL.

  • And type the URL.
  • When you choose the Webhook action from the trigger actions drop-down, the data of the lead that verifies the event gets posted into the URL that you add in the input.
    • In our example, when a lead is created via Chatbot, automatically his data gets posted into the specified URL.

trigger webhook action

Handle “Incoming STOP texts” through triggers

When leads reply to you by texts such as STOP, STOPALL, UNSUBSCRIBE, CANCEL, END, or QUIT;  you can automatically handle those incoming STOP texts to set the lead as “do not contact” through Triggers.

Setting a trigger to automatically mark leads as “do not contact”

You can configure automatically marking a lead as “do not contact” and handle the incoming STOP texts through triggers:

  • On the left sidebar, click on Automations > Triggers
  • Hit + Add Trigger
  • In the Trigger Event:
    • Choose “Incoming email or SMS
      • Presently, this feature is available for incoming texts only.
    • Set Body content matching to: “STOP | STOPALL | UNSUBSCRIBE | CANCEL | END | QUIT“. Add any other words that your leads use to ask for stopping.
    • Select the type of matching in the “Specify the type of matching“dropdown:
      • exact (only matches texts having exactly the same content)
      • word (matches all texts that contain the content anywhere in the body)
      • any (matches all texts that contain the content anywhere in the body and in any form, e.g., “test” would match “testing”)

    • This will match any incoming text with the defined content (not case insensitive) according to the type of matching you choose.
  • In the Trigger Action:
    • Set “Add all lead contacts to do not contact list

Handle incoming STOP texts/emails through triggers

    • Regarding the leads that that were added to the “do not contact” list, they do get included in the bulk sequence but their texts get blocked from our side so it doesn’t get actually sent.
      You can check them by clicking on the blocked leads count in ‘Bulk Sequences’ widget.
    • To honor your client’s opt-out request, you can send him an automated message.
    • Also, set “Break after Trigger executes” to YES / true so that no other triggers execute after this match on that Lead.
    • It’s good to give this trigger a high priority level (e.g. 100). This indicates which trigger should be processed first.

 

Zapier aNinja Integration

In this article, we show you how Zapier aNinja integration can be done.

What is Zapier

Zapier is a tool that allows you to connect web apps together. An integration between two apps is called a Zap.

And a Zap is made up of a Trigger and one or more Actions.

Whenever the trigger happens in one app, Zapier will automatically perform the action in the other app.

So you can set up the trigger step of your choosing. In this example, we will be using Facebook Ads as the trigger. Next, select *“Webhooks by Zapier” to enter new records into aNinja.

*Requires Zapier Premium account.

Setting up a Zap trigger

  • Choose your App and event
    • In the Zap editor, click to open the Trigger step.
    • Under Choose app & event section, search for and select the app that will trigger the Zap.
    • Click the Event dropdown menu and select the event that will trigger the Zap.
  • Choose your App account
    • If you already have an account connected to Zapier for the trigger app, select it from the account dropdown menu.
    • If not, click + Connect a new account and follow the instructions to connect your app to Zapier.
    • Once a connection is selected, click Continue.
  • Customize your Options
    • Next, set up your trigger options if available.
  • Test your Trigger
    • Click Test Trigger

Once you’ve set up your trigger, you can set up the rest of your Zap by adding an action.

Setting up a Zap action

After setting up the first Trigger of the Zap, the next step is to add an action to your Zap.

  • Choose your App and event
    • In the Zap editor, click the Action step, or the plus + icon to add an action to your Zap.
    • Search for or select the app you want to use in your action (aNinja).
    • Select “Webhooks by Zapier” to post into aNinja.

    • Choose Action Event
      • aNinja only supports receiving leads using a request because POST is more secure than GET.

  • Then, we need to find aNinja API Key
  • Under Submission URL field put:
    • https://aninja.com/api/v1/contactform/?apikey=YOUR_API_KEY
      • Example:  https://aninja.com/api/v1/contactform/?apikey=sample123-6yauyue5e
    • Enter the Posting URL
      – Copy & Paste in the Posting URL from above

Mapping
  • Start mapping the data. Use the “+” icon in Zapier to choose the information that you’d like to map.
  • The “Data” field should be the aNinja Field Name.
  • Please note your field mappings may look different than the example screenshot below.

* For adding a custom field, simply add “Custom.” before the data field. For example Custom.source would automatically create a custom field and map data in your aNinja account.

Customizing
  • After mapping, you can skip these fields, as there is no need to make any alterations to these fields in Zapier.

Test & Continue
  • Next, review the data you’re trying to map and test!
  • Lastly, if there is any failure or error, please update the data accordingly.

  • The next screen will show you whether or not Zapier was able to successfully perform the action step for you.

The data that your action app will output.

  • Click Close.

Where does the imported data appear

After the integration, you can search your aNinja CRM for the imported leads. You can also search for any custom field, opportunities, and other information you have imported.

  • Lead’s contacts appear in the leads contact section in the lead view.
  • Opportunities also appear in the opportunity section in the lead view.
  • The company’s info appears on the top left of the lead view, in the Company section.
  • Custom fields appear in the custom field section of the lead view.
  • Lead Search is a field that also appears in the bottom left of the lead view. Specifically, these are info/links on the lead or the organization found in Google search.

Need help with your Zapier aNinja integration? Leave us an email at support@aninja.com. And we will happily assist you.

 

Creating aNinja Triggers

Creating aNinja Triggers allow you to programmatically trigger actions based on specific events and conditions.

Creating aNinja Triggers

  • On the left sidebar, click on Automations > Triggers.Creating aNinja Triggers
  • Go ahead and click on the help (?) icon next to Triggers. This redirects you to a short youtube video to get an overview of the triggers.triggers - help guide
  • Click on Add Trigger.
  • Choose the Trigger Event from the drop-down
  • Choose whether to add a Trigger Condition (optional)
    • The condition could be e.g. a custom field = Source = Facebook (Custom.Source=”Facebook”). This way, you narrow your search and target more specifically the leads that match the event of the trigger and this condition.
  • Finally, select the Trigger Actions you actually want to kick off when that event with those specific conditions takes place.Creating aNinja Triggers
    • You can add multiple actions to be executed when the event takes place.

Trigger’s events

Choose the Trigger Event from the drop-down:

  • Incoming call
    • Define the incoming call type
  • Incoming email or SMS
    • Body content matching
    • Specify the type of matching
  • Lead created via API
  • Lead created via Chatbot
  • Outgoing SMS with an error code
    • Select the error code
  • Workflow step status changes
    • Select the step

Trigger’s actions

You can add multiple actions to be executed when the event takes place.

  • [Delay] Set delay duration in minutes for triggering event actions
  • [Do not contact] Add all lead contacts to “do not contact” list.
  • [Do not contact] Remove all lead contacts to “do not contact” list.
  • [Email] Send lead info to an email address (from: no-reply@aninja.com)
  • [Lead Assignment] Assign to User
  • [Lead Assignment] Assign to Users from Team (using Round Robin)
  • [Lead Assignment] Assign to Users from Team (using Weighted Round Robin)
  • [Lead merge] Merge new lead into existing duplicate
  • [Sequence > Email] Start Email Sequence
  • [Sequence > Text] Start Text Sequence
  • [Sequences > Stop] Stop all sequences & Conversations (Email & Text)
  • [Webhooks] Post Lead Details to URL
  • [Workflow Step Status] Update Workflow Step Status

Trigger’s Options 

Set the Options to:

  • ON/OFF to
    • Activate/deactivate the trigger.
  • Indicate the priority of execution (in case there were other triggers in action).
    • 1 is the lowest priority
  • Break after Trigger Executes
    • Stops executing any other triggers coming up by priority after this one

  • Don’t forget to Save

Examples of Tiggers

Example 1:
  • On an event that is “Incoming email or SMS
  • Choose to execute an action to “Stop Sequences and Conversations (emails & texts)

As a result, the lead that replied to you by text or email will stop receiving the rest of the sequence he is enrolled in.

Example 2:
  • On an event that is Incoming email or SMS
  • Choose to execute a first action to “Add all lead contacts to the “do not contact” list”
  • Choose to execute a second action to “Stop Sequences and Conversations (emails & texts)

Subsequently, the lead that replied to you by text (this option is only available for texts presently), with stop or unsubscribe will be moved to the “do not contact” list.

As a matter of fact, the lead will still be included in the future sequences, but their texts get blocked from our side so it doesn’t get actually sent.
You can check them by clicking on the blocked leads count in ‘Bulk Sequences’ widget.

Example 3:
  • On an event that is “Lead created via API
  • Choose to execute an action to “Start Email Sequence”
  • ==> Choose which Email Sequence to use (e.g. “Welcome”)
  • ==> Choose which Email Account to use (e.g. “demo@gmail.com”)

So now, when a lead is created via API, he will receive the first step of the “Welcome” sequence, based on the delay you’ve set in the sequence, launched from the demo@gmail.com account.

Example 4:
  • On an event that is “Change in the Workflow step”
  • Choose to execute an action to “add a lead’s contact to the “do not contact” list”
  • ==> When changed to: “Sales / Opp Status / Deal Closing”.

Afterward, when you change a lead’s workflow step to Sales / Opp Status / Deal Closing, he will be added to the “do not contact” list. 

Example 5:
  • On an event that is “Lead created via Chatbot
  • Choose to execute an action to “Assign to user”
  • ==> Select a user (e.g. John Doe)

As a result, when a lead is created into your account through Chatbot, he is automatically assigned to John Doe.

Example 6:
  • On an event that is “Incoming Call
    • Type of call ==> “Missed Call”
  • Choose to execute an action to “Assign to user”
    • ==> Select a user (e.g. John Doe)
  • Add a second actionStart Text Sequence”
    • ==> Choose which Text Sequence to use (e.g. “Thank you for reaching out”

As a result, when you miss a call from a lead, he is automatically assigned to John Doe, AND, he receives a thank you text.