Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

Introduction

The connector package is a zip file containing configuration files related to Custom Connectors. These configuration files has have their own specific formatformats. The intent of this document is to describe document describes the content of connector package and format Connector Package and the formats of the configuration files to be placed in package zip.

Content of Connector Package

The connector package zip contains below files:

  • Image file for Connector.
  • XML and JSON Layouts for Trigger and Action entities.
  • Triggers And Actions Text file.
  • Lookup configuration file.

Follow the below steps to create Connector packagePackage.

  1. Identify the Entities for Connector

    1. Refer the Connector documentation to to know about what the entities are available in it. For example, for a CRM App the entities can be Lead, Contact, or Customer etc.

    2. Make a list of entities and endpoints that you want to integrate with.

    3. Make a list of attributes (fields) for each entity.

  2. Create XML and JSON Layout files for each entity

    1. For each entity 

      1. Create EntityResponse.xml file and EntityResponse.json file.

      2. Create EntityRequest.xml file and EntityRequest.json file. For example, for entity Lead create LeadResponse.xml and LeadRequest.xml filesxml files

      3. For example: for entity Lead create file LeadResponse.xml and LeadRequest.xml

      4. Edit the above created xml and JSON files in Text editor.

      5. Paste the below sample XML in xml file.

        Code Block
        languagexml
        titleEntity Layout
        collapsetrue
        <Root>
        </Root>


      6. Add the entity name as a tag in this xml file. For example, for Entity entity Lead see below xml.

        <Root>
            <leads>
            </leads>
        </Root>
        Expandcode
        languagexml
        titleEntity Layout
        collapsetrue
        <Root>
            <leads>
            </leads>
        </Root>


      7. Enter the attributes of this entity as individual elements in this the xml, and save this the file.

        <Root>
            <leads>
                <id/>
                <fisrt
        Expandcode
        languagexml
        titleEntity Layout
        collapsetrue
        <Root>
            <leads>
                <id/>
                <first_name/>

                <last
        
                <last_name/>

                <created
        
                <created_at/>

            </leads>
        
            </leads>
        </
        Root>
        Root>


      8. Paste below json into JSON file.

        Expandcode
        languagejs
        titleEntity Layout
        collapsetrue
        {

        
            "fieldName""Root",

        
            "expanded":
         true
         true,

        
            "leaf":
         false
         false,

        
            "children": []

        
        }


      9. Add the entity name as a children in this json file. For exmaple example, for Entity entity Lead see below json

        expand

        .

        Code Block
        languagejs
        titleEntity Layout
        collapsetrue
        {

        
            "fieldName""Root",

        
            "expanded":
         true
         true,

        
            "leaf":
         false
         false,

        
            "children": [{

        
                "fieldName""leads",

        
                "expanded":
         true
         true,

        
                "isAttribute":
         false
         false,

        
                "leaf":
         false
         false,

        
                "value""\n\t",

        
                "children": []

        
            }]

        
        }


      10. Enter the attributes of this entity as individual elements in this json file, and save this the file.

        Expandcode
        languagejs
        titleEntity Layout
        collapsetrue
        {

        
            "fieldName""Root",

        
            "expanded":
         true
         true,

        
            "leaf":
         false
         false,

        
            "children": [{

        
                "fieldName""leads",

        
                "expanded":
         true
         true,

        
                "isAttribute":
         false
         false,

        
                "leaf":
         false
         false,

        
                "value""\n\t",

        
                "children": [{

        
                    "fieldName""id",

        
                    "expanded":
         true
         true,

        
                    "isAttribute":
         false
         false,

        
                    "leaf":
         true
         true
                },

        
                {

        
                    "fieldName""
        fisrt
        first_name",

        
                    "expanded":
         true
         true,

        
                    "isAttribute":
         false
         false,

        
                    "leaf":
         true
         true
                },

        
                {

        
                    "fieldName""last_name",

        
                    "expanded":
         true
         true,

        
                    "isAttribute":
         false
         false,

        
                    "leaf":
         true
         true
                },

        
                {

        
                    "fieldName""created_at",

        
                    "expanded":
         true
         true,

        
                    "isAttribute":
         false
         false,

        
                    "leaf":
         true
         true
                }]

        
            }]

        
        }


    2. Now we should have below files ready (if we have 3 entities LeadConsidering Lead, Contact, and Customer )as three Entities, you would have created the below files: 

      1. LeadResponse.xml

      2. LeadRequest.xml

      3. ContactResponse.xml

      4. ContactRequest.xml

      5. CustomerResponse.xml

      6. CustomerRequest.xml

      7. LeadResponse.json

      8. LeadRequest.json

      9. ContactResponse.json

      10. ContactRequest.json

      11. CustomerResponse.json

      12. CustomerRequest.json

  3. Create Triggers and Actions

    File

    file

    1. Create a new Text file named triggersAndActions.txt and edit it in Text text editor.

    2. Paste the below JSON data in this text file. This JSON data is sample data having no Triggers and actions Actions in it.

      Code Blockexpand
      languagejs
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [],

      
       

      
       

      
          // Actions List

      
          "actions": [],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {},

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {}

      
      }


    3. For each entity identified in Step 1, create a Trigger object as shown below. The below JSON shows Trigger object for Entity "Lead".

      expand
      Code Block
      language
      js
      titleTrigger
      collapsetrue
      {

      
          // The name visible to user on GUI while selecting Trigger for this Connector

      
          "displayName" "New Lead",

      
       

      
          "entityName""Lead",

      
       

      
          // A unique value for this Trigger.

      
          "value""newLead",

      
       

      
          "description""Triggers when a new Lead is added to your account.",

      
       

      
          // Name of the xml file containing the fields of this entity

      
          "xmlLayoutPath""LeadResponse.xml",

      
       

      
       

      
          // Name of the json file containing the fields of this entity

      
          "jsonLayoutPath""LeadResponse.json",

      
       

      
          // The date field you want to specify to fetch incremental data for this entity.

      
          "field""created_at"

      
      }


    4. Add the Trigger Object to triggers field in triggersAndActions.txt. By adding a trigger the file would look like as similar to the one shown below.

      expand
      Code Block
      language
      js
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [

      
              {

      
                  "displayName" "New Lead",

      
                  "entityName""Lead",

      
                  "value""newLead",

      
                  "description""Triggers when a new Lead is added to your account.",

      
                  "xmlLayoutPath""LeadResponse.xml",

      
                  "jsonLayoutPath""LeadResponse.json",

      
                  "field""created_at"

      
              }

      
      ],

      
       

      
       

      
          // Actions List

      
          "actions": [],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {},

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {}

      
      }


    5. Create New Trigger objects for each Entity entity and add to triggers field. Below JSON shows triggersAndActions.txt file with two Triggers.

      Expandcode
      languagejs
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [

      
              {

      
                  "displayName" "New Lead",

      
                  "entityName""Lead",

      
                  "value""newLead",

      
                  "description""Triggers when a new Lead is added to your account.",

      
                  "xmlLayoutPath""LeadResponse.xml",

      
                  "jsonLayoutPath""LeadResponse.json",

      
                  "field""created_at"

      
              },

      
              {

      
                  "displayName" "New Contact",

      
                  "entityName""Contact",

      
                  "value""newContact",

      
                  "description""Triggers when a new Contact is added to your account.",

      
                  "xmlLayoutPath""ContactResponse.xml",

      
                  "jsonLayoutPath""ContactResponse.json",

      
                  "field""created_at"

      
              }

      
      ],

      
       

      
       

      
          // Actions List

      
          "actions": [],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {},

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {}

      
      }
      
      


    6. For each entity identified in Step 1, create a an Action object as shown below. The below JSON shows Action object for Entity entity "Lead"

      expand
      Code Block
      language
      js
      titleTriggers and Actions JSON
      collapsetrue
      {

      
              // The name visible to user on GUI while selecting Trigger for this Connector

      
              "displayName" "Create Lead",

      
              "entityName""Lead",

        
      
        
              // A unique value for this Trigger.

      
              "value""createLead",

      
              "description""Creates a new Lead to your account.",

      
              // Name of the xml file containing the fields of this entity

      
              "xmlLayoutPath""LeadResponse.xml",

      
       

      
       

      
              // Name of the json file containing the fields of this entity

      
              "jsonLayoutPath""LeadResponse.json",

      
          }


    7. Add the Action Object to actions field in triggersAndActions.txt. By After adding a the action, the file would look like as similar to the one shown below.

      Expandcode
      languagejs
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [

      
              {

      
                  "displayName" "New Lead",

      
                  "entityName""Lead",

      
                  "value""newLead",

      
                  "description""Triggers when a new Lead is added to your account.",

      
                  "xmlLayoutPath""LeadResponse.xml",

      
                  "jsonLayoutPath""LeadResponse.json",

      
                  "field""created_at"

      
              },

      
              {

      
                  "displayName" "New Contact",

      
                  "entityName""Contact",

      
                  "value""newContact",

      
                  "description""Triggers when a new Contact is added to your account.",

      
                  "xmlLayoutPath""ContactResponse.xml",

      
                  "jsonLayoutPath""ContactResponse.json",

      
                  "field""created_at"

      
              }

      
      ],

      
       

      
       

      
          // Actions List

      
          "actions": [

      
              {

      
                  "displayName" "Create Lead",

      
                  "entityName""Lead",

      
                  "value""createLead",

      
                  "description""Creates a new Lead in your account",

      
                  "xmlLayoutPath""LeadRequest.xml",

      
                  "jsonLayoutPath""LeadRequest.json",

      
              }

      
          ],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {},

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {}

      
      }


    8. Create New Action objects for each Entity and add to actions field. Below JSON shows triggersAndActions.txt file with two actions.

      Expandcode
      languagejs
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [

      
              {

      
                  "displayName" "New Lead",

      
                  "entityName""Lead",

      
                  "value""newLead",

      
                  "description""Triggers when a new Lead is added to your account.",

      
                  "xmlLayoutPath""LeadResponse.xml",

      
                  "jsonLayoutPath""LeadResponse.json",

      
                  "field""created_at"

      
              },

      
              {

      
                  "displayName" "New Contact",

      
                  "entityName""Contact",

      
                  "value""newContact",

      
                  "description""Triggers when a new Contact is added to your account.",

      
                  "xmlLayoutPath""ContactResponse.xml",

      
                  "jsonLayoutPath""ContactResponse.json",

      
                  "field""created_at"

      
              }

      
          ],

      
       

      
       

      
          // Actions List

      
          "actions": [

      
              {

      
                  "displayName" "Create Lead",

      
                  "entityName""Lead",

      
                  "value""createLead",

      
                  "description""Creates a new Lead in your account",

      
                  "xmlLayoutPath""LeadRequest.xml",

      
                  "jsonLayoutPath""LeadRequest.json",

      
              },

      
              {

      
                  "displayName" "Create Contact",

      
                  "entityName""Contact",

      
                  "value""createContact",

      
                  "description""Creates a new Contact in your account",

      
                  "xmlLayoutPath""ContactRequest.xml",

      
                  "jsonLayoutPath""ContactRequest.json",

      
              }

      
          ],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {},

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {}

      
      }


    9. Add URL for each Trigger and Action defined in this file. 

      1. Define key-value pairs for each trigger and Action.

      2. The key should be Trigger or Action value defined in triggers or actions field.

      3. The value should be the complete URL endpoint to be hit for this particular trigger or action.

      4. Define a special Key Value key-value pair for account Testing. The key should be "testaccount" and value should be the url URL to test the Connectivity with connector account.

      expand
      Code Block
      language
      js
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [

      
              {

      
                  "displayName" "New Lead",

      
                  "entityName""Lead",

      
                  "value""newLead",

      
                  "description""Triggers when a new Lead is added to your account.",

      
                  "xmlLayoutPath""LeadResponse.xml",

      
                  "jsonLayoutPath""LeadResponse.json",

      
                  "field""created_at"

      
              },

      
              {

      
                  "displayName" "New Contact",

      
                  "entityName""Contact",

      
                  "value""newContact",

      
                  "description""Triggers when a new Contact is added to your account.",

      
                  "xmlLayoutPath""ContactResponse.xml",

      
                  "jsonLayoutPath""ContactResponse.json",

      
                  "field""created_at"

      
              }

      
          ],

      
       

      
       

      
          // Actions List

      
          "actions": [

      
              {

      
                  "displayName" "Create Lead",

      
                  "entityName""Lead",

      
                  "value""createLead",

      
                  "description""Creates a new Lead in your account",

      
                  "xmlLayoutPath""LeadRequest.xml",

      
                  "jsonLayoutPath""LeadRequest.json",

      
              },

      
              {

      
                  "displayName" "Create Contact",

      
                  "entityName""Contact",

      
                  "value""createContact",

      
                  "description""Creates a new Contact in your account",

      
                  "xmlLayoutPath""ContactRequest.xml",

      
                  "jsonLayoutPath""ContactRequest.json",

      
              }

      
          ],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {

      
              "testaccount" "< Test Connectivity URL >",

      
              "newLead" "< Lead URL >",

      
              "newContact" "< Contact URL >",

      
              "createLead" "< Lead URL >",

      
              "createContact" "< Contact URL >"

      
      },

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {}

      
      }


    10. Add method for each Trigger and Action defined in this file. 

      1. Define key-value pairs for each trigger and Action.

      2. The key should be Trigger or Action value defined in triggers or actions field.

      3. The value should be the complete http method to be used to hit url URL for this particular trigger or action.

      4. Define a special Key Value key-value pair for account Testing. The key should be "testaccount" and value should be the http method to be used to hit in order to test the Connectivity with connector account

      Expandcode
      languagejs
      titleTriggers and Actions JSON
      collapsetrue
      {

      
          // Triggers List

      
          "triggers": [

      
              {

      
                  "displayName" "New Lead",

      
                  "entityName""Lead",

      
                  "value""newLead",

      
                  "description""Triggers when a new Lead is added to your account.",

      
                  "xmlLayoutPath""LeadResponse.xml",

      
                  "jsonLayoutPath""LeadResponse.json",

      
                  "field""created_at"

      
              },

      
              {

      
                  "displayName" "New Contact",

      
                  "entityName""Contact",

      
                  "value""newContact",

      
                  "description""Triggers when a new Contact is added to your account.",

      
                  "xmlLayoutPath""ContactResponse.xml",

      
                  "jsonLayoutPath""ContactResponse.json",

      
                  "field""created_at"

      
              }

      
          ],

      
       

      
       

      
          // Actions List

      
          "actions": [

      
              {

      
                  "displayName" "Create Lead",

      
                  "entityName""Lead",

      
                  "value""createLead",

      
                  "description""Creates a new Lead in your account",

      
                  "xmlLayoutPath""LeadRequest.xml",

      
                  "jsonLayoutPath""LeadRequest.json",

      
              },

      
              {

      
                  "displayName" "Create Contact",

      
                  "entityName""Contact",

      
                  "value""createContact",

      
                  "description""Creates a new Contact in your account",

      
                  "xmlLayoutPath""ContactRequest.xml",

      
                  "jsonLayoutPath""ContactRequest.json",

      
              }

      
          ],

      
       

      
       

      
          // URL mapping for Each Trigger and Action

      
          "urlMap": {

      
              "testaccount" "< Test Connectivity URL >",

      
              "newLead" "< Lead URL >",

      
              "newContact" "< Contact URL >",

      
              "createLead" "< Lead URL >",

      
              "createContact" "< Contact URL >"

      
          },

      
       

      
       

      
          // Method mapping for each trigger and Action

      
          "methodMap": {

      
              "testaccount" "GET",

      
              "newLead" "GET",

      
              "newContact" "GET",

      
              "createLead" "POST",

      
              "createContact" "POST>"

      
          }

      
      }


    11. Save this file. triggersAndActionsJson.txt file is ready.

  4. Create Lookup file

    1. Create a an xml file named lookupConfiguration.xml

    2. Paste below content into it.

      Expandcode
      languagexml
      titleLookup Configuration

      <lookupConfiguration>

          <columns>

               

          </columns>

          <operators>

               

          </operators>

      </lookupConfiguration>

      Add Each entity
      collapsetrue
      <lookupConfiguration>
          <columns>
               
          </columns>
          <operators>
               
          </operators>
      </lookupConfiguration>


    3. Add each Entity in Columns tag as shown below.

      expand

      <lookupConfiguration>

          <columns>

              <entity type
      Code Block
      language
      xml
      titleLookup Configuration
      collapsetrue
      <lookupConfiguration>
          <columns>
              <entity type="Lead">

                   

              </entity>

              <entity type
      
                   
              </entity>
              <entity type="Contact">

                   

              </entity>

              <entity type
      
                   
              </entity>
              <entity type="Customer">

                   

              </entity>

          </columns>

          <operators>

               

          </operators>

      </lookupConfiguration>
      
                   
              </entity>
          </columns>
          <operators>
               
          </operators>
      </lookupConfiguration>


    4. Add attributes for each entity Entity as shown below.

      <lookupConfiguration>

          <columns>

              <entity type
      Expandcode
      languagexml
      titleLookup Configuration
      collapsetrue
      <lookupConfiguration>
          <columns>
              <entity type="Lead">
                  <column fieldValue
      
                  <column fieldValue="first_name"
       fieldName
       fieldName="first_name"
       fieldType
       fieldType="string"
       apiFieldType
       apiFieldType="string"/>

              </entity>

              <entity type
      
              </entity>
              <entity type="Contact"
      >            <column fieldValue
      >
                  <column fieldValue="first_name"
       fieldName
       fieldName="first_name"
       fieldType
       fieldType="string"
       apiFieldType
       apiFieldType="string"/>

              </entity>

              <entity type
      
              </entity>
              <entity type="Customer">
                  <column fieldValue
      
                  <column fieldValue="first_name"
       fieldName
       fieldName="first_name"
       fieldType
       fieldType="string"
       apiFieldType
       apiFieldType="string
      "/>

              </entity>

          </columns>

          <operators>

               

          </operators>

      </lookupConfiguration>
      "/>
              </entity>
          </columns>
          <operators>
               
          </operators>
      </lookupConfiguration>


    5. Add Operators for each field Type and apiField type.

      expand

      <lookupConfiguration>

          <columns>

              <entity type
      Code Block
      language
      xml
      titleLookup Configuration
      collapsetrue
      <lookupConfiguration>
          <columns>
              <entity type="Lead">
                  <column fieldValue
      
                  <column fieldValue="first_name"
       fieldName
       fieldName="first_name"
       fieldType
       fieldType="string"
       apiFieldType
       apiFieldType="string
      "/>

              </entity>

              <entity type
      "/>
              </entity>
              <entity type="Contact">
                  <column fieldValue
      
                  <column fieldValue="first_name"
       fieldName
       fieldName="first_name"
       fieldType
       fieldType="string"
       apiFieldType
       apiFieldType="string"/>

              </entity>

              <entity type
      
              </entity>
              <entity type="Customer">
                  <column fieldValue
      
                  <column fieldValue="first_name"
       fieldName
       fieldName="first_name"
       fieldType
       fieldType="string"
       apiFieldType
       apiFieldType="string"
      />

              </entity>

          <
      /
      columns>

          <operators>

              <operator displayName
      >
              </entity>
          </columns>
          <operators>
              <operator displayName="Equals"
       value
       value="equals"
       type
       type="string"
       apiFieldType
       apiFieldType="string"/>
              <operator displayName
      
              <operator displayName="Equals"
       value
       value="equals"
       type
       type="integer"
       apiFieldType
       apiFieldType="integer"/>
              <operator displayName
      
              <operator displayName="Equals"
       value
       value="equals"
       type
       type="boolean"
       apiFieldType
       apiFieldType="boolean"/
      >        <operator displayName
      >
              <operator displayName="Equals"
       value
       value="equals"
       type
       type="DateTime"
       apiFieldType
       apiFieldType="date-time"/>

              <string>

                  <operator value
      
              <string>
                  <operator value="equals"/>

              </string>

              <integer>

                  <operator value
      
              </string>
              <integer>
                  <operator value="equals"/>

              </integer>

              <boolean>

                  <operator value
      
              </integer>
              <boolean>
                  <operator value="equals"/>

              </boolean>

              <DateTime>

                  <operator value
      
              </boolean>
              <DateTime>
                  <operator value="equals"/>

              </DateTime>

          </operators>

      </lookupConfiguration>
      
              </DateTime>
          </operators>
      </lookupConfiguration>


    6. Lookup Configuration file is ready.

  5. Download the Image

    File

    file

    1. You can download the connector Image file from respective Connector Provider.

    2. The image file should be in PNG format. 

    3. The name of the image can be any valid name.

  6. Zip the individual files in a zip file

    .

    See the

    Zip Content

    zip content below.

    Image RemovedImage RemovedImage RemovedImage RemovedImage RemovedImage Removed

    Image Added

    Image Added

    Image Added

    Image Added

    Image Added

    Image Added