Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

1. Description

Task of the flow:

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

1.1. Flow example

An example flow can be seen in Figure 1.

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

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

1.1.1. Flow description

Component  

Block of component

 Component parameters

Description

Start


Start component
Ringback

Set the beeps.

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

Bridge

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

End the call




Trigger

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

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

+${bridge_epoch} == 0

HTTP Request

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

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

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"
                                    }


Fig. 2. Create an Activity on a missed call

  • No labels