Skip to main content

Creatio

Creatio is a low-code CRM. A REST web service set up in its Studio and a business process with the element Call web service send the event to the Flows address when a record changes: an opportunity moves to another stage, a lead comes in, a case changes its status. The event starts your flows: the customer gets the right message in Viber or SMS, with a reminder if nothing happens.

For a single SMS or Viber message without flows, Creatio Marketplace has a free connector of the platform (Classic UI). That is a different path, not flows.

Written from Creatio documentation

This page is written from the public documentation of Creatio and has not been checked on a live account yet.

What you need​

  • Rights to Studio: Web services and the process designer. Which Creatio licences include them is not confirmed by the documentation.
  • Someone who builds processes in Creatio. It is low-code work — a web service and a process, not "paste an address".
  • The body has no arrays: Call web service cannot set them (only a script task can).

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Creatio.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Set up Creatio​

  1. Open Studio → Web services → New web service → REST service.

  2. Properties: Name — AlphaFlow, Code — UsrFlowEvents, Web service URI — the start of the address from the cabinet, up to and including /hooks; Retries on call failure — 3.

  3. Methods → add a method: Name — Send event, Method address — the token, the part of the address after /hooks/; Request type — POST; Content type — JSON; Response timeout, ms — 5000.

  4. Request parameters → Add parameter with Parameter type — Body parameter, for each line:

    ParameterPath to element (JSONPath)Data typeDefault value
    event$.eventTextthe name of the AlphaFlow event, for example deal_stage_changed
    contact$.contactObject—
    ↳ phone, email, external_id$.phone, $.email, $.external_idText—
    traits$.traitsObject—
    ↳ first_name$.first_nameText—
    message_id$.message_idText—
    context$.contextObject—
    ↳ source$.sourceTextcreatio
    properties$.propertiesObject—
    ↳ stage, record_id$.stage, $.record_idText—

    A nested parameter takes only the tail of the path: $.phone under $.contact.

  5. Response parameters → Quick setup → From response example → Example in JSON: {"status": "success"}.

  6. Send a test request → Send request — check the response.

  7. Build a business process: a signal on a change of the record (Opportunity, Lead or Case, the stage field) → Read data (the contact of the record: phone, email, Id, name) → Call web service, where Which method to call? — AlphaFlow / Send event, and the values of the parameters come from Read data. message_id — from the Id of the record and the Id of the stage, as in the body below. It takes only printable ASCII without spaces: a stage name in Cyrillic or with a space is refused with invalid_message_id.

The web service then sends this body:

{"event":"deal_stage_changed",
"contact":{"phone":"<mobile phone of the contact>","email":"<Email>","external_id":"<contact Id>"},
"traits":{"first_name":"<first name>"},
"message_id":"creatio:deal_stage_changed:<opportunity Id>:<stage Id>",
"context":{"source":"creatio"},
"properties":{"stage":"<stage>","record_id":"<opportunity Id>"}}
  • The names of the signals and of the process elements, apart from Call web service and Which method to call?, and how the element maps the fields of the record to the parameters, are not confirmed by the documentation.
  • Splitting the address into Web service URI and Method address is our suggestion. Whether the whole address fits into Web service URI with an empty Method address is not confirmed.

Step 3. Send a test​

Press Send a test request on the page of the method, then change the stage of a test record. The event appears in Flows → Connections → Event journal within seconds. The body is already in the AlphaFlow format, so AlphaFlow takes it as it is, without mapping. The connection shows Recognised: Creatio.

Events​

Record in CreatioAlphaFlow eventProperties
Lead comes inlead_submittedrecord_id
Opportunity changes its stagedeal_stage_changedstage, record_id
Case is createdticket_createdrecord_id
Case changes its statusticket_status_changedstage, record_id
Case is closedticket_closedrecord_id

Put ticket_closed only into a process whose start signal is filtered by the value — for example, a change of Case with the condition Status = Closed. A process on any change of the status sends ticket_status_changed with stage: otherwise a case that only moved to another status reaches the customer as "closed".

The name of the event is the value of the event parameter — the default value in the web service, or another one for another process. The contact is found by contact.phone, contact.email and the Creatio id in contact.external_id; the first name comes from traits.first_name. There is no table of stages: the body is already a AlphaFlow event, and stage is only a property. The names of the events are the ones the ready-made templates expect — see Recommended events.

Good to know​

  • Creatio repeats a call as many times as Retries on call failure says — on an error code or a timeout. Response timeout is 5000 ms by default.
  • message_id from the Id of the record and the Id of the stage makes a repeat in the same stage not recorded twice.
  • The address always answers 200. Above the daily event limit the event is refused in AlphaFlow with quota_exceeded and shown in the journal; the process in Creatio keeps running.

Creatio documentation​