- Simple Number Setup
- Simple Call Flow Setup
- Setup Voicemail
- Create a New Extension
- Edit Phone Buttons
- Create a Conference Bridge
- Create a Fax Extension
- Setup e911
- Ordering Phone Numbers
- Porting Phone Numbers
- Simple Call Flow Menu Setup
- Simple Hours Schedule
- Creating Agents
- Design an Auto-attendant
- Hotdesk
- Test e911
- Create a Routing Extension
- Create Cascading Rings
- Create Cascading Ring to Queue
- Adding a Forward
- Limit 800 Spammers
- Find Call Records
- How To…
Contact API Tutorial
This tutorial provides sample PHP code to demonstrate how to connect and synchronize a CRM system with the WebFones contact platform. It shows how to store contact records in WebFones using an external-id, which enables future updates to be synced reliably. A versioning system is also used, allowing your middleware to detect and retrieve updated contact records whenever changes occur.
The API requires an API Key which you can find on your account’s API Prefereces page.
Fetching Contacts and Contact Record Changes
The fetch_contact_changes.php fetches all the records in the database and then monitors changes by polling every 10 seconds.
php fetch_contact_changes.php "API_KEY"
This will list the uuid primary key used to identify each contact record. That can be used in the next step.
Connecting your CRM records with WebFones Contact Records
You can update or insert contact records into WebFones by iterating through your CRM contacts and linking each one using its unique CRM ID.
php set_extension_id.php "API_KEY" --uuid "RECORD UUID" --extension-id "CRM ID"
Updating the WebFones Contact Record
When the record in the CRM changes, the data can be moved to the WebFones database by using the CRM ID stored in the external ID column. We recommend using the API to update the contact record. Here is an example of updating a contact record using the example php.
php update_contact.php "API_KEY" --extension-id "CRM ID" --firstname "Joe" --lastname "Smith"