Note: The Zap examples covered in this article support Sales Records only. Refer to this article for Individual Records.
Overview
This article has written instructions and screenshots for using Zapier to save Vonage call recordings as Activities in AMS+. New to Zapier? See this article first.
To use the Zaps in this article, your Sales Records must have phone numbers, and you must have a paid plan in Zapier.
IN THIS ARTICLE
If you complete setup for both inbound and outbound calls…
You will have two Zaps with the same trigger. When a call is recorded in Vonage, both Zaps will run, but only one will continue depending on the call direction (inbound or outbound). The Zap that continues will locate a Sales Record in AMS+ and add an Activity with the recording file.
Setup for saving inbound calls
Once set up and activated, this Zap will trigger when you record a call, if the call was inbound, the Zap will continue and save the recording to AMS+ as an Activity.
To get started:
- You will need your account’s API sid and key for some of the steps in this Zap. If you’re the Account Owner, you can obtain these parameters by contacting the AMS+ Support Team at 866-338-7075 or by email at help@agencybloc.com.
- In a separate window, go to www.zapier.com and log in to your Zapier account.
- Put this window side-by-side.
- Read the step-by-step instructions below while you build the Zap.
1. Set up the trigger
- In Zapier, select the ‘Create Zap’ button.
- In the Zap title, name it “Inbound Call Recordings for Vonage - Sales Record”.
- In the trigger, search for the ‘Vonage Business Communications’ app
- In the trigger event, select ‘New Call Recording’.
- Select ‘Continue’ and choose your Vonage account. Make sure it has all your recordings.
- If you use ‘Company Wide Recordings’, you will want to connect your Zap to a Vonage account with all recording access.
- In the trigger type, choose ‘Company Wide Recordings’.
- Test the trigger and continue.
2. Use ‘Filter by Zapier’ to trigger the Zap for inbound calls only
If it’s an outbound call, the Zap will stop and it will only continue if it’s inbound. This will ensure that the Zap will only create Activities for calls from clients and not producers or agents. See this section on how to build a Zap for outbound calls.
- In the Zap, add an action directly after the trigger.
- In the Built-in tools menu, select ‘Filter’.
- In the Filter setup & testing section, set the filter to only continue if the ‘Call Direction’ field contains the text ‘Inbound’.
- Continue.
3. Use ‘Formatter by Zapier’ to exclude the country code in phone numbers
Vonage tracks the country code with phone numbers. The country code for the US is +1, so most callers in the US will have a leading 1 in their phone numbers. With the country code, a US phone number has 11 digits.
However, AMS+ stores 10-digit phone numbers. You will need to add a formatter step to the Zap to ignore the country code (1) so it can successfully match phone numbers in Vonage with phone numbers in Sales Records in AMS+.
- In the Zap, add an action directly after the inbound calls filter.
- In the Built-in tools menu, select ‘Format’.
- In the Choose apps & event section, set the Event to ‘Numbers’.
- Continue.
- Set up the action to transform and ‘Format Phone Number’.
- In the Input field, select the ‘1. Caller ID’ field.
- In the To Format field, select ‘5558001212 (No Symbols, National)’ in the dropdown list.
- Continue.
- Test and continue.
- The result will be a 10-digit phone number.
4. Add an action to look up Sales Records in AMS+ by phone number
When this Zap creates an Activity, it needs to find an existing Sales Record in AMS+ to associate with the new Activity.
Every Sales Record in AMS+ has a unique ID number. This action will allow the Zap to look up Sales Record IDs in AMS+ and find existing Sales Record.
- In the Zap, add an action directly after the exclude country code formatter.
- In App event menu, search for and select ‘Webhooks by Zapier’ as the app.
- Set the Event to 'POST'.
- Enter the following URL for the Leads Search API: https://app.agencybloc.com/api/v1/salesEnablement/leads/searchphone and set the Payload Type to ‘Form’.
- Populate the ‘Data’ section with the API parameter and corresponding value or variable.
- Every request should start with “sid” and “key” followed by the corresponding values.
After the sid and key, add the required parameter for the Leads Search API endpoint: PhoneNumberSearchQuery (case sensitive). In the right column, enter the 3. Output variable containing the re-formatted phone number. - Select ‘Test Step’ to carry out the request to AMS+.
- Continue.
5. Use ‘Filter by Zapier’ to only continue if a Sales Record is found
To prevent unnecessary errors, this filter will stop the Zap if no Sales Record is found with the phone number.
- In the Zap, add an action directly after the POST in Webhooks by Zapier.
- In the App event menu, select ‘Filter’.
- In the Filter setup & testing section, set the filter to only continue if the ‘4. Record Id’ field exists.
- Continue.
- Test and continue.
6. Add an action to create Activities in AMS+
This step will only cover the required fields that are needed to create an Activity in AMS+. For a full list of Activity field options, refer to the Activities API documentation.
- In the Zap, add an action directly after the filter to only continue if a Sales Record exists.
- Select ‘Webhooks by Zapier’ as the app.
- Set the Event to ‘POST’.
- Enter the URL of the Create Activity API: https://app.agencybloc.com/api/v1/activities/create and set the Payload Type to ‘Form’.
- Populate the Data section with the API parameter and corresponding value or variable.
- Every request should start with “sid” and “key” followed by the corresponding values.
- Add a row, and enter entityTypeID in the left field. In the right field, enter ‘Lead’.
- Add a row, and enter entityID in the left field. In the right field, map to the ‘4. Record Id’ field, which is pulled from the Leads Search API step.
- Add a row, enter subject in the left field. In the right field, enter ‘Sales Record - Inbound Recorded Call’.
- This subject line will be applied to all Activities created by this Zap.
- (Optional) Add a row, and enter notes in the left field. In the right field, enter “To:” and map to the ‘1. Dnis’ Vonage field. Add another hard return, enter “From” and map to the ‘1. Caller ID’ Vonage field.
- Add a row, enter statusLookupID in the left field. In the right field, enter ‘Complete’.
- If you want to follow up on the Activities, enter ‘In Progress’. Note: Setting the status to 'In Progress' will require a follow-up date and time.
- Add a row, and enter activityDate in the left field. In the right field, map to the ‘1. Start’ Vonage field.
- Add a row, and enter attachment_file_name_1 in the left field. In the right field, enter ‘recording.mp3‘.
- Add a row, and enter attachment_file_url_1 in the left field. In the right field, enter ‘1. File (Exists but not shown)‘.
- Once all of the parameters and values are added, select the ‘Continue’ button.
- Select ‘Test Step’ to carry out the request to AMS+.
Setup for saving outbound calls
Once set up and activated, this Zap will trigger when you receive an outbound call and save the recording to AMS+ as an Activity.
If you created a Zap for inbound calls, follow these steps for a shortcut to make another one for outbound calls:
-
Create a duplicate of the inbound calls Zap.
-
Rename the duplicate Zap’s title to “Outbound Recordings for Vonage - Sales Record” so you can tell it apart.
-
Open the new Zap and edit the steps.
In the new Zap, you will only need to edit the following steps:
- Step 2: Filter by Zapier
- Step 3: Formatter by Zapier
- Step 6: Create Activity in AMS+
Step 2: Filter by Zapier
- Select and expand expand the 2. Only continue if… step.
- In the Filter setup & testing section, set the filter to only continue if the ‘Call Direction’ field contains the text ‘Outbound’.
- Continue.
Step 3: Formatter by Zapier
- Select and expand the 3. Numbers by Formatter in Zapier step.
- Select and expand the Choose apps & event section.
- Set up the action to transform and ‘Format Phone Number’.
- In the Input field, select the ‘1. Dnis’ field.
- In the To Format field, select ‘5558001212 (No Symbols, National)’ in the dropdown list.
- Continue.
- Test and continue.
- The result will be a 10-digit phone number.
Step 6: Create Activity in AMS+
Review all fields where you typed or manually entered and update them accordingly. For a full list of Activity field options, refer to the Activities API documentation.
- Select and expand the 6. POST in Webhooks by Zapier (Create Activity) step.
- Select ‘Webhooks by Zapier’ as the app.
- Set the Event to ‘POST’.
- Enter the URL of the Create Activity API: https://app.agencybloc.com/api/v1/activities/create and set the Payload Type to ‘Form’.
- Populate the Data section with the API parameter and corresponding value or variable.
- Every request should start with “sid” and “key” followed by the corresponding values.
- Add a row, and enter entityTypeID in the left field. In the right field, enter ‘Lead’.
- Add a row, and enter entityID in the left field. In the right field, map to the ‘4. Record Id’ field, which is pulled from the Leads Search API step.
- Add a row, enter subject in the left field. In the right field, enter ‘Sales Record - Outbound Recorded Call’.
- (Optional) Add a row, and enter notes in the left field. In the right field, enter “To:” and map to the ‘1. Dnis’ Vonage field. Add another hard return, enter “From” and map to the ‘1. Caller ID’ Vonage field.
- Add a row, enter statusLookupID in the left field. In the right field, enter ‘Complete’.
- If you want to follow up on the Activities, enter ‘In Progress’. Note: Setting the status to 'In Progress' will require a follow-up date and time.
- Add a row, and enter activityDate in the left field. In the right field, map to the ‘1. Start’ Vonage field.
- Add a row, and enter attachment_file_name_1 in the left field. In the right field, enter ‘recording.mp3‘.
- Add a row, and enter attachment_file_url_1 in the left field. In the right field, enter ‘1. File (Exists but not shown)‘.
- Once all of the parameters and values are added, select the ‘Continue’ button.
- Select ‘Test Step’ to carry out the request to AMS+.
Common questions
Do I need to set up these Zaps for each Vonage user?
If your Vonage account is using 'Company Wide Recordings', you do not need to create the Zap for each user in the account. If your account does not have 'Company Wide Recordings' enabled, each user who can record on demand will need their own inbound and outbound Zap setup.
What happens if more than one record has the phone number?
The Activity with the call recording will be attached to the first record found in Step 4. There is no way to choose which record the activity goes to if more than one record is found. With the appropriate security permissions, you can re-associate Activities to another record.