Herramientas de usuario

Herramientas del sitio

Barra lateral

Integria Documentation


8. Customer Relationship Management (CRM)

The customer management model is based on four elements: companies (or accounts), contact (people), contract and invoice.


They're the main element in customer management. They store data on the enterprise or organization. This means: name, phone, role as a company, and other data. The group it belongs to is especially relevant because only Integria users that belong to that group can see that company's data, with the exception of the manager, a user with permission to handle all the operations related to the company.

Main view (Companies)

From this view we can see relevant data on existing companies.

Company details

This is the detailed company view, where we can update the data.

Associated people

Here we can see the people associated to the company. This is just informative and each user can only be associated to one company.

To create a user and associate a company we already created, we have to go to People, Management and Create User.


Here we can see this company's recent activity.


In the Contacts section people asociated with the company can be added, including email, telephone, etc.


In Company you can also include contracts associated with the company and access the details directly.


There is also a section for leads


We can also access a list of current invoices. Clicking on them will show the details or download any attached file along with the invoice.


Uploading files associated with the company in question is also possible; useful for reports, invoices, receipts, etc.

In the Enterprise version there is access control for companies. Users associated to the company and users that belong to the 'parent' company have access to it. This means that when a user has access to a company, it also has access to all the 'child' companies.

Company roles

Classify companies according to categories: partner, client, manufacturer, vendor, lead, etc.


Company import from csv

The import can be done by an export made in Integria (in which the structure as it is generated in the system shoud not be manipulated) and it can be done by a CSV file.

For the first case the input file will be the same as the one we previously exported, so it does not impose problems when processing the CSV.

For the second case a series of parameters must be entered in order, some required and some not, being able to choose empty values for the latter. The fields will be the following for the logical order established by the tool:

  • Name
  • Adrress
  • Fiscal id
  • Country
  • Website
  • Comments
  • Id company role
  • Id parent
  • Manager
  • Last update
  • Payment conditions
  • Custom fields: must previously exist in your Integria IMS system and must be indicated in order, being able to choose a value, or in case of not wanting to give them value, blank space.


“copmany test,,,Spain,,,,,admin,0000-00-00 00:00:00,,Integria,20”


Contacts are people related to the company. Here is where we can define, apart from that person's name, his or her phone number, email address, and, of course, the company to which a contact belongs.

Sometimes we don't want to include the companies corresponding to ALL our contacts, because of the fact that some contacts maybe considered “occasional”, i.e: expo contacts, or those imported from a list. These contacts can be “grouped” under a “false” company account, i.e: XXXXX Campaign. This way, if it's helpful to create a new company account for a specific contact, it can be created and the contact changed, so that it “pends” on the new company.

In the Enterprise version, there is access control to a company's contacts. Those who have access to them are: users associated to the company and those users belonging to the parenting company.


Linked to a specific company, they carry important data about economic details or start/end dates. It's especially useful to search for contracts that are about to expire, among other details.

In the Enterprise version, there is access controls to a company's contracts. Those who can access them are users related to the company, and users belonging to the parent company.

Contract types

Contract types allow us to create contracts with custom fields associated with these types.

The fields that can be defined in the types of contract are “name” and “description”, the first one is obligatory and unique.

To create a contract type there are two options:

- The button below the contract types list.

- The ‘Create contract type’ option that appears in the sidebar.

Definable fields in contract type creation/editing:

  • Name: obligatory and must not be repeated, i.e. no two contracts may share a name. This is the field that is displayed in ‘create/edit contracts’ in order to select the type.
  • Description: optional field.

For each type of contract a name and description can be defined. And once inside these types (clicking on the name) we will access the custom fields:

Custom field types can take the following values:

- Text type: in the “create/edit contract form an input field will be displayed.

- Textarea: in the “create/edit contract” form a text area field will be displayed.

- Combo box: in the “create/edit contract” form a select form will be displayed where you can see all available options.

- Linked: interrelated custom fields


  • First, create the TYPE field. In this case, no parent field is selected because it is the first in hierarchy. Values are separated by commas.

  • Then create the MAKE field. In this case, select the parent field TYPE. After, fill out the field with the values separated by commas as in the previous example. Because this field has a parent, the values must be associated with it. To do this, first include the parent field value separated by |

  • Next, create MODEL field. Select the parent MAKE and input the values.</li>

- Numeric: in the “create/edit contract” form a numeric field will be displayed.

- Date: in the “create/edit contract” form a date field will be displayed.

A list with all the fields you created will be displayed.

The list is made up of the following columns:

  • Field name
  • Field type
  • Parent: exclusive to linked types as these can refer to a parent
  • Value: exclusive to combo box and linked types as these have a selectable default value
  • Actions: allow the field to be edited or deleted

Practical Applications of contract Types:

Select contract type:

All the custom fields will appear.

Fill out the fields and create the contract:

Keep in mind that you can now search for contracts for the specific type that we have chosen and their associated custom fields.

Contracts Templates

Contract templates allow us to generate automatic pdfs. In addition, macros can be used for greater flexibility. Let's look at an example:

The creation or edition of templates consists of three elements: name, description and content.

To apply a previously created template, it is necessary to go to the contract edition where the option “Generate template” will appear.

Selecting “Generate template” will open a pop-up that will allow you to choose the desired template.

Clicking the “Generate” button will add an attachment to the contract and download it.


In these templates the following contract-related macros can be used:

  • _id_contract_ = id.
  • _name_contract_ = name.
  • _contract_number_ = number of the contract.
  • _contract_description_ = description.
  • _date_begin_ = begining date.
  • _date_end_ = ending date.
  • _id_company_ = id of the company.
  • _id_group_ = id of the group.
  • _name_group_ = name of the group.
  • _private_ = if it's private.
  • _id_status_ = status id.
  • _name_status_ = status name.
  • _company_name_ = name of the company.
  • _company_address_ = address of the company.
  • _company_fiscal_id_ = fiscal id of the company.
  • _company_country_ = country of the company.
  • _company_website_ = website of the company.
  • _company_comments_ = comments of the company.
  • _company_manager_ = manager of the company.
  • _company_last_update_ = last update of the company.
  • _company_payment_conditions_ = payment conditions of the company.
  • _contract_type_id_ = id of the contract type.
  • _contract_type_name_ = name of the contract type.
  • _contract_type_description_ = descripction of the contract type.
  • _custom_XX_ = Custom macros are formed with the word “custom” along with the id of the contract type field which can be seen in the list of contract type fields.
  • _template_id_ = id of the template.
  • _template_name_ = name of the template.
  • _template_description_ = description of the template.
  • _format_long_time_ = current date (long format). Example: 11 Wed April 2018.
  • _format_short_time_ = current date (short format): 11/04/2018.
  • _format_annual_date_ = current date (only year): 2018.

Contracts import from CSV

The import can be done by an export made in Integria (in which the structure as it is generated in the system shoud not be manipulated) and it can be done by a CSV file.

For the first case the input file will be the same as the one we previously exported, so it does not impose problems when processing the CSV.

For the second case a series of parameters must be entered in order, some required and some not, being able to choose empty values for the latter. The fields will be the following for the logical order established by the tool:

  • Name
  • Contract number
  • Description
  • Begin date
  • End date
  • Company id
  • SLA id
  • Group id
  • Private
  • Status
  • Contract type id
  • Custom fields: must previously exist in your Integria IMS system and must be indicated in order, being able to choose a value, or in case of not wanting to give them value, blank space.

Example (type 1 with two custom fields, one text and the other numeric)

“Contract test,123456789,Description,2017-07-25,2017-07-31,1,,,0,1,1,Integria,20”


Similarly to contracts, they serve the purpose of knowing when there are invoices that have been emitted but are pending payment, as well as knowing when and how a company has been charged. The system is used to manage EMITTED invoices by us, this means, in no case is this an ERP that can perform treasury management, manage lack of payment, or other features common to ERPs. Invoice management, which includes invoice creation in PDF format, is oriented from the point of view of customer, not provider, management.

In the Enterprise version there is access control to a company's invoices. The company owner and all the users with a Management (CM) profile have access to them. In the Open Source edition, everyone has access to invoices.

Invoices include a variety of fields. The most important ones are:

  • Company: invoices appear in the invoicing section specific to the company selected.
  • Invoice ID: invoice number. It can't be duplicated on another invoice from the sysem. This system is strictly meant for invoices emitted from our company, therefore it is impossible to have two invoices with the same ID.
  • Reference: Informative;generally meant to indicate an order number, a shopping order, or similar.
  • Invoice status: payment pending, paid or cancelled.
  • Creation date and payment date.
  • Concept: there are five lines with five amounts. For each concept there is an amount. Always in brute costs, without calculating taxes.
  • Tax: indicate the %, i.e. 21 for 21% taxes.
  • Currency: EUR is the default currency.
  • Description: text that will appear on the invoice, generally to clear up data from the order, add more data (for example the account number for payment, etc.).

Once the invoice has been created, we can attach files to it.

An example of its use would be if it is an invoice generated by another system and we want to save an image of the original invoice file, here we can attach a file for that.

Generating invoice IDs

This utility allows us to automatically generate an ID whenever we create an invoice. Activate the option 'Enable auto ID' in the CRM configuration, as seen in the screenshot below:

In the field named “Invoice ID Pattern” a string is saved to be used later in generating the IDs. This pattern will contain both a fixed and a variable part. The variable part must be numeric and it will serve as a first element from which a sequence can be calculated. The variable part will be placed in brackets. The rest will be constant for all invoices.

Pattern example: 15/[1000]

In this case, the three first invoices that will be generated will be 15/1000, 15/1001 y 15/1002.

Invoice ID generation is only applied to those invoices that are “Sent”.

Invoice blocking

An invoice can be blocked -using the lock icon- so that once it's blocked, it can't be modified. It can only be modified by the person who blocked the invoice.


Through Integria's lead management we can perform a followup on possible customers. Generally these leads come in through “external” routes (through API), although they can also be created manually from the editor. Just like other items on Integria, a Lead has an “Owner” who is the person who manages it.

The system allows users to create notes on that lead's activity, and modify its status, so to make it progress from an “unclassified” lead to a closed sale (or loss). Leads can be forwarded (via email) or managed directly from the tool via email. If these actions are performed directly from Integria, the delivery and reception of email replies can be managed, and will be reflected in the lead's followup process, since it includes Integria's address in the CC field to “capture” the lead's email replies.


They have their own register of activity:


In the “Tracking” section a register of changes of status and modifications about the lead is kept, in form of a log:


From the “Mail Reply” section you can reply directly by email to the address indicated:


There's also an option to pass on the information about the lead to another email, with a detailed template:


Furthermore, you can directly access the company associated with the lead, if there is one, and attach documents in exactly the same way as from the “Companies” section.

Managing leads via email

An Enterprise feature, this permits commercial activity pertaining to leads to be managed via email; it automatically updates correspondence and uploads files related to the lead.

It uses an email inbox as a reference, allowing Integria to read and extract information from the contents and any attachments. In the “Configure email section” you can find more information on how to set this up.

This function is used through the “Mail reply” option available in leads. Using this option, Integria sends an email adding a token (eg. Lead#35) to the beginning of the subject line, as well as including the address of the reference inbox in Cc.


This ensures that when a client or a salesperson replies to an email, a copy goes to the reference inbox allowing Integria to identify and process it. The update process is completed by adding the information from the mail, plus any attachments, and uploading them to the server associated with the corresponding lead.

Remember: both clients and salesforce must use the “Reply to all” email function to make sure that a copy of the mail reaches the reference inbox included in Cc.

Reports on Leads activity

Managing leads allows you to automatically generate reports including data on growth, potential clients, present status of negotiations, etc.

Leads statistics:


Opportunities pipeline:

Creating a lead through a webform

Using the API REST on Integria IMS it's possible to create new leads from a contact form on a web. This way all the information on your leads can be introduced into the tool automatically. Next we'll cover a brief example of how to create a script to execute this task.

The following PHP code creates a form and gathers the data sent by the form. With them it creates a call to Integria's API, which in turn creates a new lead.


//Config parameters
$integria_url = "";
$user = "api_user";

//Get post parameters
$name = $_POST["name"];
$email = $_POST["email"];
$company = $_POST["company"];
$role = $_POST["role"];
$country = $_POST["country"];
$comments = $_POST["comments"];

//Create url to call the API
$myurl = $integria_url."/include/api.php?user=".$user.
$myurl .= urlencode($email).",".urlencode($country).",0,0,,,

// Configure curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $myurl);
curl_setopt($ch, CURLOPT_HEADER, 0);

// Send curl request and close
$ret = curl_exec($ch);

curl_close ($ch); 

<h2>Integria IMS Lead form</h2>
<form method="post">
Full name: <input type="text" name="name" size="35" >
E-mail: <input type="text" name="email" size="25" >
Company: <input type="text" name="company" size="30" >
Position: <input type="text" name="role" size="30" >
Country: <input type="text" name="country" size="20" >
Comments and questions:
<textarea name="comment" cols="50" rows="8"></textarea>
<input type="submit" name="submit" value="Submit">

The resulting form looks like this.

Next, we'll comment the code. The first two variables define the URL where Integria IMS is stored and the user that has permission to use API functions.

//Config parameters
$integria_url = "";
$user = "api_user";

The following assignments gather values sent by the form and assign those values to variables for a later use.

//Get post parameters
$name = $_POST["name"];
$email = $_POST["email"];
$company = $_POST["company"];
$role = $_POST["role"];
$country = $_POST["country"];
$comments = $_POST["comments"];

Next a string of text is generated with the URL you'll be using to create the leads via Integria IMS's API. Apart from the server and user address, OP parameters are configured with the value create_lead which indicates the API function that will be be used and “params” with the function parameters.

//Create url to call the API
$myurl = $integria_url."/include/api.php?user=".$user.
$myurl .= urlencode($email).",".urlencode($country).",0,0,,,

An example of the resulting URL's outcome could be as follows:

Lastly, the code performs a call to Integria IMS' API via PHP's CURL utility.

// Configure curl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $myurl);
curl_setopt($ch, CURLOPT_HEADER, 0);

// Send curl request and close
$ret = curl_exec($ch);

curl_close ($ch); 

When sending a form like, for example, the following:

A new lead will be created as can be seen in the screenshot below:


Campaigns allow users to group information about a promotional campaign for a product or service. Using the Newsletter and Leads features, the user will be able to demonstrate the effectiveness of a campaign.

A campaign is defined by the following parameters:

  • Title: campaign title
  • Start and end dates: dates to define the length of the campaign.
  • Expenses: Total costs associated to the campaign. This field will be used to perform various calculations on the effectiveness of the campaign.
  • Description: an outline of the campaign.

With the different sources Integria IMS will create the campaign report, which can be seen by clicking on Statistics in the top menu of the campaign view.

This report contains data on the status of sales related to the campaign, along with the ROI that the campaign is expected to have. You'll also be able to view statistics on newsletter effectiveness and the lead conversion ratio.

To be able to develop a campaign two things are needed: being able to create leads 
from a source that includes the campaign identifier (through a custom form for lead insertion) 
as well as using a newsletter related to that campaign, so that it automatically increases 
the number of received newsletters. For this it's necessary for Integria to be accessible 
from the Internet, since the custom form for lead creation attacks against Integria's API, 
and the newsletter sent to each customer includes a transparent pixel that shows whether 
a person has opened the message or not.  

Example of a campaign creation

The first step is to create a campaign with the corresponding duration and costs, as has been discussed in the previous section.

Once the campaign has been defined, the pertaining leads can be associated with the newsletter the campaign needs. To link them you'll have to visit each lead and newsletter edition, and select the desired campaign in the Campaign field.

The campaign can be associated to as many leads and newsletter editions as you wish. From the moment in which the different leads and editions are added, you'll be able to view campaign results via the report that will be automatically updated whenever associated data changes (leads and newslettters).

Reports and listings

One of the most important parts of a customer database or a CRM is the chance it provides to extract data listings to be able to later download them in PDF, HTML, CSV formats, and also schedule them automatically with the report scheduler.

For this you'll need to know SQL language, or rely on an external reporting engine such as “Crystal Reports”. The structure for Integria's database can be found in the file integria_db.sql on Integria's main directory.

The report generator is in the People/Custom reports section. This would be an example of creating and executing the report that every contact grouped generically for a newsletter under a determined “account” can view.

There is also a report scheduler that allows users to send these reports via email, in PDF format, but you must create them first. There are some predefined reports, like the ticket report, that sends a similar report to that generated in real time from the interface.

en/guia_administracion/gestion_de_clientes_crm.txt · Última modificación: 2019/04/26 11:22 (editor externo)