The Integration Gateway accelerates digital transformations by easily integrating with over 700 systems across enterprise applications and databases, including DocuSign, Jira, and SendGrid. This how-to guide provides an example for creating contacts in your Salesforce account using Unqork's Integration Gateway.
To learn more about Unqork's Integration Gateway and how to access it, view our Integration Administrationarticle.
What You'll Learn
In this article, you'll learn how to create a recipe, connection, and endpoint to create Salesforce contacts using Unqork's Integration Gateway.
Setting Up an Integration Using Integration Gateway
Before we begin, let's review the necessary steps to set up a Salesforce integration and make an API call using the Integration Gateway.
1.
Create a connection: First, you must connect to your Salesforce account to make any API calls using Unqork. This also requires you to have a Salesforce account and authorization credentials.
2.
Create a recipe: Recipes are workflow-like steps that perform actions. Recipes have many advanced features that can handle all app integrations and workflow automation scenarios, including conditional triggers, actions, and so on.
3.
Define an endpoint for a recipe: To make an API call to Salesforce in your Unqork applications, you must establish an endpoint. You'll use this endpoint to make the call in a Plug-In component.
4.
Configure a Plug-In component: Set up a Plug-In component to call your recipe's endpoint and create a Salesforce contact.
In the Username and Password fields, enter your Salesforce credentials.
9.
Click Log In.
Your connection is now established and active for use in your recipe. Next, you'll review how to create your recipe.
Configure Your Create Salesforce Contact Recipe
Recipes let you integrate with your connections, set up triggers, and determine the actions and events you want to occur. For this how-to guide, you'll configure a recipe to create contact information to Salesforce.
To create a recipe and designate a starting point:
1.
Open the Unqork project.
2.
Click Create ▾.
3.
Select Recipe.
Configure a Starting Point
First, you need to configure the starting point, or trigger, for your recipe. With the recipe page now open, configure the following fields:
1.
In the Name field, enter a name for your recipe.
2.
From the Pick a Starting Point* section, select Build an API Endpoint.
You must create an API endpoint recipe, or the integration will not be available in Unqork.
3.
Click Start Building.
You can then navigate to the Recipe Builder to finish setting up your starting point. The last step of this process is to select a response status code.
1.
In the Setup panel to the right of the Recipe Builder, scroll down to the final Responses* sub-panel.
2.
Click Add Response.
3.
In the Name field, enter the message that displays for a successful API response.
4.
From the HTTP Status Code drop-down, select 200 - OK.
You can create as many status codes and display messages as you wish. These status codes make it easier for users to identify when an issue occurs.
5.
At the top of the panel, click Save.
Configure an Action
Next, configure an action that connects to your Salesforce account to create a contact record, or submission, based on specific fields.
To create an action:
1.
Below your starting point, or trigger, click the button.
2.
Select Action in an App. A panel displaying all your connected apps displays to the right of the page.
3.
Search for and select the Salesforce tile.
4.
Search for and select the Search Records tile.
5.
Select the Salesforce Connection you made earlier.
6.
From the Object drop-down, select Contact. A list of fields (or inputs) populate, so you can hard-code values in your action.
Expand the Properties panel. A list of available properties display that you can drag and drop into your Action fields.
Properties come with the ability to drag and drop them into your Action fields. We refer to these interactive properties as datapills.
9.
In the Last Name* field, drag and drop the User Name datapill.
10.
In the Email field, drag and drop the User Email datapill.
11.
At the top of the panel, click Save.
12.
At the top right of the panel, click x Exit.
13.
Click Start Recipe.
Your recipe is now running and ready for use in Unqork. The final step to complete in the Integration Gateway is to create an endpoint for your recipe.
Configure Your Endpoint
To use your recipe in a Plug-In component, you must create an endpoint in the Integration Gateway. Once created, it displays in the component's External Services drop-down.
To configure your endpoint:
1.
At the top left of the Recipe Builder, click the API Platform tab.
2.
From the API Collections panel, select the Unqork Gateway collection tile.
In the Endpoint Name* field, enter a name for this endpoint.
It's best practice to create a name that defines your endpoint.
5.
From the Recipe* drop-down, select your recipe.
6.
In the Endpoint Path* field, enter a unique path for your endpoint. For example, createSalesforceContact.
7.
From the HTTP Method* drop-down, select the method to use for this endpoint. In this case, we'll set it to POST to create Salesforce contacts.
8.
Click Add Endpoint. Your new endpoint tile displays at the top of the API Platform page.
9.
On your endpoint tile, set the Active toggle to (ON).
You endpoint is now active. You can select it in a Plug-In component.
Configuration
The last step of the process is to configure a module to create the last name and email address for a contact and send it to Salesforce. These instructions assume you have a module saved with a title.
Configure the Text Field Components
First, let's add a couple of Text Field components to add a last name and email address to send to Salesforce.
1.
In the Module Builder, drag and drop two Text Field components onto the canvas.