Skip to content

CourtiGo ​

Finds, creates and updates the brokerage firm’s client records, adds policies, tasks, history notes and documents.

The CourtiGo node connects an insurance brokerage firm’s mailbox to its CRM: find or create the sender’s record, log the exchange on it, create a policy or a task, and file the email’s attachments in the document store.

It works with a CourtiGo connection created once in Connections. See CourtiGo.

At a glance ​

  • Type: courtigo.api · version 1
  • Category: Data
  • Kind: Step — one stage of a run
  • Effect: Writes outside (external_write) — writes outside Loop & Roll; described instead of performed during a test run
  • Needs a carrier email: No
  • Connection: CourtiGo
  • Inputs: main
  • Outputs: main
The ports of “CourtiGo”: what comes in on the left, what goes out on the rightInput: main. Outputs: main. An error output appears when its failure setting is “Follow the Error output”. It needs a CourtiGo connection.CourtiGocourtigo.apimainmainerror · only with “Follow the Error output”Connection: CourtiGo
The ports of “CourtiGo”: what comes in on the left, what goes out on the right

Connection ​

This node needs a CourtiGo connection.

Parameters ​

connection ​

CourtiGo connection — The CourtiGo connection to use. Create it once in Connections; its key never appears in the workflow.

  • Type: Connection (credential)
  • Required: Yes
  • Default: "" (empty)

action ​

Action

  • Type: One choice (options)
  • Required: Yes
  • Default: findOrCreateClient
  • Options:
    • findClient — Find a client record: By free text, email address or SIREN.
    • findOrCreateClient — Find or create a client record: Looks up by email address; creates the record when nobody has it.
    • getClient — Get a client record
    • createClient — Create a client record
    • updateClient — Update a client record: Only the filled-in fields are sent.
    • listContracts — List a client’s policies
    • createContract — Create a policy
    • addNote — Add a history note: Logs an exchange on the client record (and the policy, if given).
    • createTask — Create a task
    • uploadDocument — File attachments in the document store: On a client record or a policy.

Search — Free text: name, company name, reference…

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is findClient
  • Expressions: {{ }} accepted

searchEmail ​

Email address

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Example: {{ email.from.email }}
  • Shown when: action is findClient
  • Expressions: {{ }} accepted

searchSiren ​

SIREN

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 20 characters at most
  • Shown when: action is findClient
  • Expressions: {{ }} accepted

limit ​

Maximum count

  • Type: Number (number)
  • Required: No
  • Default: 10
  • Whole number, from 1 to 100
  • Shown when: action is one of findClient, listContracts

clientId ​

Client record — The record identifier, as returned by the lookup ({{ data.<step>.clientId }}).

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of getClient, updateClient, listContracts, createContract, addNote, createTask
  • Expressions: {{ }} accepted

lastName ​

Last name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

firstName ​

First name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

companyName ​

Company name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

email ​

Email address

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Example: {{ email.from.email }}
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

mobile ​

Mobile

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

phone ​

Phone

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

address ​

Address

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

postalCode ​

Postal code

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

city ​

City

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

siren ​

SIREN

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is one of findOrCreateClient, createClient, updateClient
  • Expressions: {{ }} accepted

contractType ​

Policy type

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID (courtigo.contractType)
  • Listed with the connection in: connection
  • Shown when: action is createContract

company ​

Insurer — One of the firm’s active insurers. Optional.

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID (courtigo.company)
  • Listed with the connection in: connection
  • Shown when: action is createContract

product ​

Product

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is createContract
  • Expressions: {{ }} accepted

contractReference ​

Policy reference

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 100 characters at most
  • Shown when: action is createContract
  • Expressions: {{ }} accepted

effectiveDate ​

Effective date — As YYYY-MM-DD.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 10 characters at most
  • Shown when: action is createContract
  • Expressions: {{ }} accepted

renewalDate ​

Renewal date — As YYYY-MM-DD.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 10 characters at most
  • Shown when: action is createContract
  • Expressions: {{ }} accepted

annualPremium ​

Annual premium incl. tax

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 20 characters at most
  • Shown when: action is createContract
  • Expressions: {{ }} accepted

contractId ​

Policy — The policy identifier. Optional for a note or a task; for a document filing it targets that policy.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of addNote, createTask, uploadDocument
  • Expressions: {{ }} accepted

title ​

Title

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Example: {{ email.subject }}
  • Shown when: action is one of addNote, createTask
  • Expressions: {{ }} accepted

content ​

Content

  • Type: Long text (text)
  • Required: No
  • Default: "" (empty)
  • 10000 characters at most
  • Shown when: action is one of addNote, createTask
  • Expressions: {{ }} accepted

assignee ​

Assigned to

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID (courtigo.user)
  • Listed with the connection in: connection
  • Shown when: action is createTask

dueAt ​

Due date — As YYYY-MM-DD.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 25 characters at most
  • Shown when: action is createTask
  • Expressions: {{ }} accepted

documentTarget ​

File on

  • Type: One choice (options)
  • Required: No
  • Default: client
  • Options:
    • client — The client record
    • contract — The policy
  • Shown when: action is uploadDocument

documentClientId ​

Client record

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is uploadDocument and documentTarget is client
  • Expressions: {{ }} accepted

visibleToClient ​

Visible to the client — Shares the document in the CourtiGo client space.

  • Type: Yes / no (boolean)
  • Required: No
  • Default: false
  • Shown when: action is uploadDocument

selection ​

Attachments to use

  • Type: One choice (options)
  • Required: Yes
  • Default: all
  • Options:
    • all — All attachments: Those of the triggering email, then the files added by earlier steps (a fetched deed, a signed PDF), in that order.
    • first — The first one only: The first attachment, when only one matters.
    • byMime — By file type: By MIME type: application/pdf, or a whole family with image/*.
    • byName — By file name: By name pattern: *.pdf, invoice-*.
  • Shown when: action is uploadDocument

mime ​

File type — Exact MIME type (application/pdf) or a whole family (image/*). Left empty, no attachment is kept.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 200 characters at most
  • Example: application/pdf
  • Shown when: action is uploadDocument and selection is byMime
  • Expressions: {{ }} accepted

namePattern ​

File name — Simple pattern: * matches anything, ? one character (*.pdf, invoice-*). Case is ignored.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 200 characters at most
  • Example: *.pdf
  • Shown when: action is uploadDocument and selection is byName
  • Expressions: {{ }} accepted

Outputs ​

  • main — Taken once the CourtiGo call succeeds, whatever the action. An error response from CourtiGo fails the step instead.

Data produced ​

What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).

  • {{ data.<step>.clientId }} — string. Client record actions: the identifier of the record found, created, read or updated. Empty when the lookup finds nothing.
  • {{ data.<step>.client }} — object. The client record as CourtiGo returns it (null when the lookup finds nothing).
  • {{ data.<step>.clients }} — array of object. Find a client record only: the records found.
  • {{ data.<step>.found }} — boolean. Find a client record only: true when at least one record matches.
  • {{ data.<step>.created }} — boolean. Find or create: true when the record was just created, false when it already existed.
  • {{ data.<step>.contracts }} — array of object. List a client’s policies only: the policies as CourtiGo returns them.
  • {{ data.<step>.contractId }} — string. Create a policy and List policies: the identifier of the created policy, or of the first one returned.
  • {{ data.<step>.id }} — string. Add a note and Create a task: the identifier of the created item, when CourtiGo returns one.
  • {{ data.<step>.documents }} — array of object. File attachments only: one document per filed attachment.
  • {{ data.<step>.count }} — number. Find, List policies and File: the number of items returned or filed.
  • {{ data.<step>.simulated }} — boolean. true when the write was described instead of performed (test run). Reads always go out for real.
  • {{ data.<step>.summary }} — string. The one-line summary in the member’s language (with summaryKey and summaryParams).

Operations ​

The Action parameter (action) picks the operation.

  • Find a client record (findClient). By Search (search), Email address (searchEmail) or SIREN (searchSiren), up to Maximum count (limit).
  • Find or create a client record (findOrCreateClient, the default). Looks up by Email address (email, required); when no record matches, creates it with the filled-in fields: Last name (lastName), First name (firstName), Company name (companyName), Mobile, Phone, Address, Postal code, City, SIREN.
  • Get a client record (getClient), Create a client record (createClient), Update a client record (updateClient, only the filled-in fields are sent). The target is Client record (clientId).
  • List a client’s policies (listContracts).
  • Create a policy (createContract): Policy type (contractType), Insurer (company), Product (product), Policy reference (contractReference), Effective date (effectiveDate), Renewal date (renewalDate), Annual premium incl. tax (annualPremium).
  • Add a history note (addNote) and Create a task (createTask): Title (title, required), Content (content), Policy (contractId, optional); for a task, Assigned to (assignee) and Due date (dueAt).
  • File attachments in the document store (documentTarget: the client record Client record documentClientId, or the policy contractId). The selected attachments (selection, mime, namePattern) are sent one by one; Visible to the client (visibleToClient) shares them in the CourtiGo client space.

Example ​

A prospect writes to the firm with a copy of their current policy. A CourtiGo node finds or creates their record:

text
action      findOrCreateClient
email       {{ email.from.email }}
lastName    {{ data.extract.nom }}

A second node logs the exchange (action = addNote, clientId = {{ data.<step>.clientId }}, title = {{ email.subject }}), a third files the attachment (action = uploadDocument, documentClientId = {{ data.<step>.clientId }}).

Tips ​

  • Returned shapes. CourtiGo’s documentation does not describe the returned objects: the node publishes them as they are and only extracts the identifier (id).
  • Size. An attachment is sent base64-encoded in the request; Loop & Roll uploads at most 10 MB per attachment.
  • Retries. Creating a record, a policy or a task is not idempotent at CourtiGo: prefer Find or create for records.

Loop & Roll — the workflow builder for email.