Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Description

Task of the flow:

For each incoming call, if it was not answered by an agent, create an Activity in Creatio.

Table of Contents

1.1. Flow example

An example flow can be seen in Figure 1.

Image RemovedImage Added

Fig. 1. The flow of create an Activity on missed call in Creatio 

Info

For convenience, you can download the completed json file, which is attached below, and then import it. 

View file
nameThe flow of create an Activity on missed call in Creatio Creatio.json
height150

1.1.1. Flow description

Component  

Block of component

 Component parameters

Description

Start

Image RemovedImage Added


Start component
Ringback

Image RemovedImage Added

Image RemovedImage Added

Set the beeps.

Selected tone -  %(1000,6000,425);loops=-1

Bridge

Image RemovedImage Added

Image RemovedImage Added

Connect to Creatio.

This requires:

  • in the field "Bridge strategy" select "multiply";
  • in the "Endpoints" element, click the "Add user" button and in the "Extension" field specify the agent extension, for example, 1000.
Hangup

Image RemovedImage Added

Image RemovedImage Added

End the call




Trigger

Image RemovedImage Added

Image RemovedImage Added

Trigger to execute the flow after the end of the call
If

Image RemovedImage Added

Image RemovedImage Added

Checks if there was a connection. Specify the condition in the "Expression" field: 

+${bridge_epoch} == 0

HTTP Request

Image RemovedImage Added

Image RemovedImage Added

To execute an HTTP REST request for authorization.

This requires:

  • in the "Url" field, enter the url address to which to make a request -

https://example-crm-bundle.terrasoft.ua/ServiceModel/AuthService.svc/Login 

It is necessary to replace the link with a link to your site;

  • in the "Methods" field, select the "POST" method;
  • in the "Cookie to variable" field, specify the name of the variable - "my_cookie", in which cookies from the service response will be saved;
  • in the "Request data" field, enter the username and password. As an example:

{
   "UserName": "Supervisor",
   "UserPassword": "Supervisor"
}

Script

Image RemovedImage Added

Image RemovedImage Added

Truncate the Creatio BPMCSRF token from the received cookies into the "BPMCSRF" variable to authorize the following requests.

This requires:

  • in the field "Set result to variable" enter the name of the variable to which the code value is passed - BPMCSRF;
  • in the field "Script" enter the code -

return ${my_cookie}.replace(/.*BPMCSRF=([-._A-Za-z0-9/]{22});.*/, '$1')

HTTP Request

Image RemovedImage Added

Image RemovedImage Added

Create an Activity on a missed call (Fig. 2).

This requires:

Accept - application/json;odata=verbose

BPMCSRF - ${BPMCSRF}

Cookie - ${my_cookie}

  • in the "Request data" field, enter the  code:

{
                                        "ColumnValues": {
                                            "Items": {
                                                "ActivityCategory": {
                                                    "ExpressionType": 2,
                                                    "Parameter": {
                                                        "DataValueType": 0,
                                                        "Value": "E52BD583-7825-E011-8165-00155D043204"
                                                    }
                                                },
                                                "RemindToOwner": {
                                                    "ExpressionType": 2,
                                                    "Parameter": {
                                                        "DataValueType": 12,
                                                        "Value": true
                                                    }
                                                },
                                                "Title": {
                                                    "ExpressionType": 2,
                                                    "Parameter": {
                                                        "DataValueType": 1,
                                                        "Value": "Missed call from: ${caller_id_number}"
                                                    }
                                                },
                                                "Type": {
                                                    "ExpressionType": 2,
                                                    "Parameter": {
                                                        "DataValueType": 0,
                                                        "Value": "E1831DEC-CFC0-DF11-B00F-001D60E938C6"
                                                    }
                                                }
                                            }
                                        },
                                        "OperationType": 1,
                                        "RootSchemaName": "Activity"
                                    }

Image Removed

Fig. 2. Create an Activity on a missed call