Validate Phone Number using Loqate
Tags: loqate, integration, tutorial, salesforce
Published: 2021-09-08 09:24:51

---
title: Validate Phone Number using Loqate
published: true
date: 2021-03-23 12:26:30 UTC
tags: #loqate, #integration, #tutorial, #salesforce
canonical_url: https://tech.forums.softwareag.com/t/validate-phone-number-using-loqate/239936/1
---

## Summary:

This article describes a business use case of validating phone number using the **Loqate** connector and logging an error message for invalid phone number.

## Pre-requisite:

- User should have a working [webMethods.io](https://www.softwareag.cloud/site/product/webmethods-io-integration.html) Integration tenant.

- User should have a working **Loqate** and **Salesforce CRM** account.

## Steps:

1. Login to [webMethods.io](http://webmethods.io/) Integration tenant and create a workflow.
2. Search for **Loqate** connector from the applications list.
3. Drag and drop the **Loqate** connector to the workflow palette.
![11](https://user-images.githubusercontent.com/58370178/98111033-03bce100-1ec6-11eb-83d9-86a32a4de99a.png)
4. Double click the **Loqate** connector icon in workflow pallet to configure the action.
5. In the action configuration screen, select **ValidateAPhoneNumber** action from the list.
6. Connect to **Loqate** by clicking the **+** icon to add a new account or select an existing account.
For more information on how to create **Loqate** account, check the following article.  
[Configuring Loqate account in webMethods.io Integration Workflow - Knowledge base - Software AG Tech Community & Forums](https://tech.forums.softwareag.com/t/configuring-loqate-account-in-webmethods-io-integration-workflow/239940)
7. In the next wizard, provide input for **ValidateAPhoneNumber** action.
![14](https://user-images.githubusercontent.com/58370178/98112618-7dee6500-1ec8-11eb-914c-f74fc03a380f.png)
8. Click **Next** , **Test** the action and **Finish**.
9. Configure the condition to switch the execution flow based on the **ValidateAPhoneNumber** output.  
**Success** : Create the account in **Salesforce**.  
**Failure** : Log the error message using **Logger** application.
10. Follow below steps to configure success flow
a) Drag and drop **Salesforce CRM** application into workflow palette.
b) Connect **Loqate** application to **Salesforce CRM** , click on the same line and select **Settings** option.
![15](https://user-images.githubusercontent.com/58370178/98113044-17b61200-1ec9-11eb-9279-dd3cfaf299a6.png)
c) Click **Add condition** followed by **Add Filter** , configure the condition as in below snapshot and Click **Done**.
![16](https://user-images.githubusercontent.com/58370178/98113409-9f9c1c00-1ec9-11eb-97f9-e5d8a5853546.png)
d) Double click the **Salesforce CRM** connector to configure **Create Accounts** action in **Salesforce**.
e) Connect to **Salesforce** by clicking the **+** icon to add a new account or select an existing account.  
For more information on how to create account
f) Click **Next** , followed by **+** to add an account in the input array.
![7](https://user-images.githubusercontent.com/58370178/98113750-205b1800-1eca-11eb-8a98-d4f3508c3f78.png)
g) Provide the input for the **Create Accounts** action.
h) Click **Next** , **Test** the action and **Finish**.
11. Follow below steps to configure failure flow.
a) Drag and drop **Logger** application into workflow palette.
b) Connect **Loqate** application to **Logger** , click the same line and select **Settings**.
![8](https://user-images.githubusercontent.com/58370178/98113758-2224db80-1eca-11eb-8458-985ebfda3741.png)
c) Click **Add condition** followed by **Add Filter** , configure the condition as in below snapshot and Click **Done**.
![9](https://user-images.githubusercontent.com/58370178/98113759-22bd7200-1eca-11eb-99fd-dcba14985053.png)
d) Double click the **Logger** to set the failure message.
e) Click **Next** and set the error message.
![10](https://user-images.githubusercontent.com/58370178/98113761-23ee9f00-1eca-11eb-9de6-284c5e66724e.png)
f) Click **Next** , **Test** the action and **Finish**.
12. Save the workflow. A fully configured workflow will look like below.
![19](https://user-images.githubusercontent.com/58370178/98218073-52738500-1f71-11eb-84a4-e5ce223f47ff.png)
13. Execute the workflow and verify the output.
![20](https://user-images.githubusercontent.com/58370178/98218085-556e7580-1f71-11eb-870b-dbeb44d2179c.png)

[Read full topic](https://tech.forums.softwareag.com/t/validate-phone-number-using-loqate/239936/1)