Setting up and using connections in Bigin toppings

Setting up and using connections in Bigin toppings

When building a topping to extend Bigin's functionality and connect it with third-party applications, creating and handling connections is an important step. Connections provide a secure way for your topping to authenticate and communicate with other applications' APIs without exposing sensitive credentials to end users. This abstraction is both secure and makes the integration easier because it eliminates the need for developers to implement complex authorization flows manually or handle authorization tokens directly.

Bigin's Developer Console offers a feature called a connection, which acts as a bridge between your topping and the third-party application you wish to integrate with. Once a connection is configured, you can reference it in your topping's functionalities using its unique link name. This enables the topping to execute REST operations such as fetching, updating, or syncing data with the connected application securely.

Now that we've achieved a basic understanding of what a connection is and how it helps toppings interact with other applications, the next step is to understand the types of connections available in Bigin's Developer Console.

Establishing connections with services

The connections feature in Bigin's Developer Console offers two types of services to help developers configure integrations according to their requirements: default services and custom services. Default services are preconfigured services available in Bigin's Developer Console that simplify integrations with some Zoho and third-party applications. If the application you want to integrate with isn't listed in the default services, you can create a custom service and configure it according to the API specifications of the third-party application.

Default services

The connections feature offers certain default services as preconfigured options that can be easily integrated with Bigin. These services come with predefined settings such as authentication type, token endpoints, scopes, and headers, which reduces the need for manual configuration. Currently, there are around 50 default services available in the Developer Console, covering a wide range of applications and platforms. This enables developers to connect to services with minimal effort.


If the application you want to integrate with your topping isn't listed in the default services, you can create a new custom service.

Custom services

Custom services enable developers to configure all aspects of a connection manually, including the authentication type, endpoints, headers, and scopes, which enables integration with third-party applications.

When setting up a custom service, developers can specify the exact authentication flow required by the external application, whether it's basic authentication, OAuth, an API key, or another method.
Notes
Note:

Refer to the official API documentation of third-party applications when configuring these settings, as this will provide the necessary details for authentication and data access.
To create a custom service, navigate to the Connections section and choose Custom Services in the Developer Console. Based on the authentication type supported, configure the custom service for the required product.


For more details on creating and configuring custom services, please refer to this guide.
Notes
Note:

Always handle sensitive information such as client IDs, client secrets, and API keys securely, and never share them publicly. After configuring and authorizing a custom service, reference it in Deluge scripts and workflow functions by using its unique connection link name, just as you do with default services.
Next, let's look at how to implement the default service connection with an example.

Create a default service connection

Let's say you're developing a Bigin topping to synchronize contact information between Bigin and Zoho Books. This integration enables contacts created or updated in Bigin to be automatically reflected in Zoho Books. The topping uses Zoho Books APIs to create, update, and retrieve customer data using a default service connection.

To create a default service connection for the topping, choose Connections from the left panel of the Developer Console and click Get Started.


Next, navigate to My Connections or Default Services. To fetch data from the Contacts module in Bigin, create a connection first. From Default Services, select Bigin and then click Create Connection to set it up.


The system will prompt you to enter the connection details. Provide a name for the connection (for example: Bigin Connection). A connection link name is generated automatically.

Next, select the scopes required for the topping's functionality. In this use case, select ZohoBigin.modules.ALL to access data from Bigin's Contacts module.

After selecting the scope, click Create and Connect to initiate the authorization process. The system redirects you to the authorization page. Click Connect, and you'll be taken to the service's login page. Choose the Bigin organization for which the topping was created, click submit, and the connection will be created.


After establishing the connection with Bigin, you must also create a connection for Zoho Books to enable record creation. To do this, create a default service connection for Zoho Books, similar to the one created for Bigin. Select the scope ZohoBooks.fullaccess.ALL to grant complete access to modules and operations in Zoho Books.

Once you've created the connections for both Bigin and Zoho Books, the system will generate connection link names for each. These link names must be used in the business logic.



Notes
Notes
Note:

During development, authorize the connection in the Sandbox environment to test integration workflows safely.
To understand the authorization process and how to implement them, please refer to this guide on authorizing connections.


After you authorize the connection, set up a workflow rule in the Bigin Developer Console that gets triggered whenever you create or update a contact in your Bigin account. Here, we need to specify the conditions that apply to the workflow and check that the email field isn't empty.

Notes
Note:

In our use case, we'll use the email address to check whether the newly created contact in Bigin already exists as a customer in Zoho Books.



When the workflow meets the specified conditions, an instant action - in this case, a function - which will execute a custom functionality that performs the following operations:
  1. Retrieves the contact details from Bigin by referencing the established connection link name biginandbooksconnection0__booksconnection.
  2. Searches Zoho Books for an existing contact that matches the email.
  3. If a matching contact exists, update the contact's phone and contact person details in Zoho Books.
  4. If the script doesn't find a matching contact, it creates a new contact in Zoho Books with the relevant information.
Below is the code that automates contact synchronization between Bigin and Zoho Books:
  1. //Retrieve contact details from Bigin using the established connection
  2. biginContact = zoho.bigin.getRecordById("Contacts",contact.get("Contacts.ID"),Map(),"");
  3. //Extract relevant contact data
  4. biginData = biginContact.get("data");
  5. contactDetails = biginData.get(0);
  6. email = contactDetails.get("Email");
  7. phone = contactDetails.get("Phone");
  8. mobile = contactDetails.get("Mobile");
  9. fullName = contactDetails.get("Full_Name");
  10. //Search Zoho Books for existing contacts by email
  11. searchParams = Map();
  12. searchParams.put("search_text", email);
  13. booksContactsResponse = invokeurl
  14. [
  15. url :"https://books.zoho.com/api/v3/contacts"
  16. type :GET
  17. parameters:searchParams
  18. connection:""
  19. ];
  20. info "Searched by name in Books: " + booksContactsResponse;
  21. booksData = booksContactsResponse.get("contacts");
  22. if(booksData != null && booksData.size() > 0)
  23. {
  24. // Extract the existingContactId
  25. existingContactId = booksData.get(0).get("contact_id");
  26. // Update existing contact
  27. updateParams = Map();
  28. updateParams.put("contact_name",fullName);
  29. updateParams.put("phone",phone);
  30. updateParams.put("mobile",mobile);
  31. updateParams.put("email",email);
  32. // Define contact person details
  33. contactPerson = Map();
  34. contactPerson.put("last_name",fullName);
  35. contactPerson.put("mobile",mobile);
  36. contactPerson.put("phone",phone);
  37. contactPerson.put("email",email);
  38. contactPerson.put("is_primary_contact",true);
  39. contactPersonsList = List();
  40. contactPersonsList.add(contactPerson);
  41. updateParams.put("contact_persons",contactPersonsList);
  42. //Prepare and execute update request
  43. parameters_data = Map();
  44. parameters_data.put("JSONString",updateParams.toString());
  45. info "parameters_data value:" + parameters_data;
  46. updateResponse = invokeurl
  47. [
  48. url :"https://books.zoho.com/api/v3/contacts/" + existingContactId + "?organization_id=XXXXXXX"
  49. type :PUT
  50. parameters:parameters_data
  51. connection:""
  52. ];
  53. info "Updated Contact: " + updateResponse;
  54. }
  55. else
  56. {
  57. // Create new contact
  58. contactDetails = Map();
  59. contactDetails.put("contact_name",fullName);
  60. contactDetails.put("email",email);
  61. contactDetails.put("phone",phone);
  62. contactDetails.put("mobile",mobile);
  63. // Define contact person details
  64. contactPerson = Map();
  65. contactPerson.put("last_name",fullName);
  66. contactPerson.put("mobile",mobile);
  67. contactPerson.put("phone",phone);
  68. contactPerson.put("email",email);
  69. contactPerson.put("is_primary_contact",true);
  70. // Add to contact persons list
  71. contactPersonsList = List();
  72. contactPersonsList.add(contactPerson);
  73. contactDetails.put("contact_persons",contactPersonsList);
  74. // Prepare and execute the create request
  75. parameters_data = Map();
  76. parameters_data.put("JSONString",contactDetails.toString());
  77. createResponse = invokeurl
  78. [
  79. url :"https://books.zoho.com/api/v3/contacts?organization_id=XXXXXXX"
  80. type :POST
  81. parameters:parameters_data
  82. connection:""
  83. ];
  84. info "Created Contact: " + createResponse;
  85. }
For details about the API endpoints and request formats used in this code, refer to the Bigin Deluge reference library and Zoho Books contacts API documentation.
After you configure the workflow and associate the function with the instant action, test the topping in the sandbox environment.
  1. To do this, click Test Your Topping in the upper-right corner of the Developer Console. This action will redirect you to the Bigin sandbox account, where you can create a new contact to test whether the functionalities work properly.
  2. After creating a new contact in Bigin, navigate to the Customers module in the Sales section of Zoho Books. When you set up the integration correctly, you'll see the newly created contact here, which confirms that Bigin and Zoho Books are synchronizing as expected. This process provides a safe and effective way to validate the workflow before deploying the topping to a production environment.


In this post, we've explained that default service connections in Bigin simplify authentication and connection with third-party applications by using predefined settings such as authentication type, token endpoints, and scopes. These connections are convenient because the Developer Console pre-configures the authentication flow and endpoints of the application you're integrating with.

To sum up: Bigin's connections feature provides a flexible foundation for integrating with a wide range of external services, and using these connections, developers can extend Bigin's integration capabilities.

Stay tuned for more about developing toppings and exploring other related features available in the Bigin Developer Console.

<< Previous                                                                                                                                                                                                                                                                         


        • Recent Topics

        • Credit Note for Shipped and Fatoora pushed invoices

          We have shipped a Sales Order and created an Invoice. The Invoice is also pushed to Fatoora Now we need to create a credit note for the invoice When we try it, it says we need to create a Sales Return in the Zoho Books, we have already created a Sales
        • FSM - Timesheet entires for Internal Work

          Hi FSM Team, Several of my clients have asked how they can manage internal timesheets within Zoho FSM. Since their technicians already spend most of their day working in FSM, it would be ideal if they could log all working hours directly in the FSM app.
        • Add a way of clearing fields values in Flow actions

          It would be great if there was an option to set a field as Null when creating flows. I had an instance today where I just wanted to clear a long integer field in the CRM based on an action in Projects but I had to write a custom function. It would be
        • Role Management

          I am creating an analytics dashboard for a company that will be utilized by its various departments such as Finance, Marketing, and HR. My goal is to design the dashboard with separate tabs for each department. Additionally, I plan to implement role-based
        • Highlight a candidate who is "off limits"

          Hello: Is there a way to highlight a candidate who is "off limits"?  I would like to have the ability to make certain candidate and / or Client records highlighted in RED or something like that.   This would be used for example when we may have placed a candidate somewhere and we want everyone in our company to quickly and easily see that they are off limits.  The same would apply when we want to put a client or former client off limits so no one recruits out of there. How can this be done? Cheers,
        • Announcing new features in Trident for Windows (v.1.37.5.0)

          Hello Community! Trident for Windows just received a major update, with a range of capabilities that strengthen email security and enhance communication. This update focuses on making your mailbox safer and your overall email experience more reliable.
        • Early Payment Discount customize Text

          Hi, I’m currently using Zoho Books and am trying to customize the standard “Early Payment Discount” message that appears in the PDF invoice template. I’ve reviewed the documentation here: https://www.zoho.com/books/help/invoice/early-payment-discount.html
        • Deprecation of SMS-based multi-factor authentication (MFA) mode

          Overview of SMS-based OTP MFA mode The SMS-based OTP MFA method involves the delivery of a one-time password to a user's mobile phone via SMS. The user receives the OTP on their mobile phone and enters it to sign into their account. SMS-based OTPs offer
        • DKIM Now Mandatory - Changes to Zoho Forms Email Policies

          Hello Zoho Forms Users, This post is to inform you about an important update regarding the authentication of all email domains in your Zoho Forms account. This year, we are doubling down on our commitment to deliver a secure, seamless, and empowering
        • Call description in notes

          When completing a call, we type in the result of the call in the description. However, that does not show up under the notes history on the contact. We want to be able to see all the calls that have taken place for a contact wihtout having to go into
        • Email Address for Contact not Populating

          When I click "Send Mail" from a Contact's page, their email address does not auto populate the "To" field. How do I make this happen?
        • New in CRM: Dynamic filters for lookup fields

          Last modified on Oct 28, 2024: This feature was initially available only through Early Access upon request. It is now available to all users across all data centers, except for the IN DC. Users in the IN DC can temporarily request access using this form
        • Why hybrid project management might be the best fit for you?

          Project management techniques are designed to equip teams with proven methods for easy and efficient project execution. While management teams may have apprehensions about adopting the hybrid method of project management, we’ve compiled the top reasons
        • Allow all Company Users to view all projects, but only owner/admins can change projects

          I was wondering if there was a permission setting I could adjust to allow all our company users to see all projects created. Then, only the project owners and admins with the change permission. Thanks
        • Fail to send Email by deluge

          Hi, today I gonna update some email include details in deluge, while this msg pops up and restrict me to save but my rules has run for one year. can you tell me how to use one of our admin account or super admin account to send the email? I tried to update
        • Seeking help to be able to search on all custom functions that are defined

          Hello I have a lot of custom functions defined (around 200) and i would like to search some specific strings in the content of those. Is there a way to accomplish that? If not, is there a way to download all existing custom functions in some files locally
        • Totals for Sales Tax Report

          On the sales tax report, the column totals aren't shown for any column other than Total Tax. I can't think of a good reason that they shouldn't be included for the other columns, as well. It would help me with my returns, for sure. It seems ludicrous
        • Add Bulk Section / Grid Layout Duplicate Feature in Zoho Forms Builder

          Currently in Zoho Forms, users can only duplicate individual fields. There is no option to duplicate an entire section or two-column/grid layout with all internal fields. This becomes inefficient when building structured forms such as Family Details,
        • Leistungsdatum in Rechnungen (Zoho Books)

          Hallo, ist es irgendwie möglich den Leistungszeitraum in der Rechnung aufzuführen? Beste Grüße Aleks
        • Zoho Trident Windows - Streams Not Visible

          Namaste We’re having an issue with Streams not being visible in Trident (Windows), which is important for us as we share many emails internally. It appears that the feature to show Streams above the Inbox folder, as seen in the default mailbox view, is
        • Sales IQ Chat Widget is Only Displaying Last Name

          Can anyone suggest why the widget is only displaying "last name"?! We have the latest version of the wordpress plugin installed. Thanks Thanks!
        • Shopify - Item sync from Zoho Inventory

          Hi team, We’ve connected Shopify with Zoho Inventory. We want that when an item is created in Zoho Inventory, it must create a product in Shopify. But currently, new items created in Zoho Inventory are not getting created in Shopify even after clicking
        • Bulk upload image option in Zoho Commerce

          I dont know if I am not looking into it properly but is there no option to bulk upload images along with the products? Like after you upload the products, I will have to upload images one by one again? Can someone help me out here? And what should I enter
        • Is it possible to setup bin locations WITHOUT mandating batch tracking?

          Hi fellow zoho users, I'm wondering if anyone else has a similar issue to me? I only have some products batch tracked (items with shelf life expiry dates) but I am trying to setup bin locations for my entire inventory so we can do stock counting easier.
        • Kill zoho meeting

          Saying the quiet part out loud. Can zoho please just give up on the idea that they can make a meeting platform and just make our workplace licenses cheaper when you remove it so people can switch to zoom or teams. Tired of the excuses, you guys cant make
        • Utilisation de Zoho en conformité avec l’article 286 du Code général des impôts (CGI)

          Cher(e) client(e), Conformément à l’article 286 du Code général des impôts (CGI) impose aux entreprises assujetties à la TVA d’utiliser des systèmes de caisse ou de gestion commerciale certifiés lorsqu’elles enregistrent des ventes à des particuliers.
        • Unable to Create Task as a Support Administrator

          Hello! I want to ask for help regarding creating tasks within the tickets. I am by default the Support Admin. I should be able to create tasks or activities right? But there's a prompt that I need to contact the Administrator. See photos for reference.
        • Introducing Forms in Zoho Sheet

          We hereby bring you the power of ​forms in Zoho Sheet. ​Now, build and create your own customized forms using Zoho Sheet. Be it compiling a questionnaire or rolling out a survey, Zoho Sheet can do it all for you. Forms is an excellent feature that helps you collect information in the simplest of ways and having it in Zoho Sheet takes it a notch higher. Build Simple yet Powerful forms Building forms using Zoho Sheet is fairly simple. The exclusive 'Form' tab lets you create one quickly. Whether you
        • Layout one survey question in a time & redirect next Page based on previous response

          I have doubt while, I am scripting survey on the Zoho where I redirecting to next page based on my previous response but didn’t get success on this. Please help me on this and tell me how I layout one survey questions in a time when I submit response
        • Zoho Bookings form pre-filled with Zoho Forms in

          Hi, I've got a contact page on my website and I'd like to have the option to book an appointment (redirected to zoho bookings page) after an option is submitted on the contact form. how would I go about doing this? thanks
        • Support “Other” Option with Free Text in Dropdown Fields

          Hello Zoho Bookings Team, Greetings, We would like to request an enhancement to the registration form fields in Zoho Bookings, specifically for dropdown fields. Current Limitation: At the moment, dropdown fields do not support an “Other” option that allows
        • Sending automated messages that appear in the ticket's conversation thread

          Good morning, esteemed Zoho Desk community, warm greetings Today I am here to raise the following problem, seeking a solution that I can implement: I need to implement an automation that allows me to send reminder messages to customers when I am waiting
        • Introducing parent-child ticketing in Zoho Desk [Early access]

          Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
        • Please verify my account

          Hi, We have just launched our website and received media coverage in our country. Hundreds of users are signing up for our platform every day. We would like to send them a welcome email, but we are unable to do so because our ZeptoMail account has not
        • Payment Card or Identity form-fill from Vault?

          Hello! I'm working on replacing Bitwarden with Vault and one issue I've run into is that I can't find any option to fill address and payment forms from Payment Card or Identity info that has been saved in Vault. Is there a way to do this? Is it a planned
        • Ability to add VAT to Retainer Invoices

          Hello, I've had a telephone conversation a month ago with Dinesh on this topic and my request to allow for the addition of VAT on Retainer Invoices.  It's currently not possible to add VAT to Retainer Invoices and it was mutually agreed that there is absolutely no reason why there shouldn't be, especially as TAX LAW makes VAT mandatory on each invoice in Europe!   So basically, what i'm saying is that if you don't allow us to add VAT to Retainer Invoices, than the whole Retainer Invoices becomes
        • Time Log Reminder

          Tracking the time spent on tasks and issues is one of the most important functions of a timesheet. However, users may forget to update the time logs because they have their own goals to achieve. But, time logs must be updated at regular intervals to keep
        • [Early-access] Introducing Zoho's CommandCenter - Cross-Zoho business process automation

            Resources to help Webinar recording | Documentation  Feature Restrictions Currently available on early-access only for US data center accounts Features Role CommandCenter as a Service uses signals across Zoho services to propel the movement of records
        • Tip #58- Accessibility Controls in Zoho Assist: Learning- 'Insider Insights'

          Learning should be clear and interruption-free for everyone. Timely feedback plays an important role in helping users understand actions as they happen, without breaking their focus. In this post, we’ll explore the final section of Accessibility: Learning.
        • ZIA "Generate Content" action doesn't have contexual data from the ticket

          "Generate Content" action doesn't have contexual data from the ticket. I try to get AI to help me with this ticket but it doesn't seem to have any ticket information as context. Although the ticket has a lot of information in it.
        • Next Page