I am looking to filter an odata request within power automate to return only records where the modifiedon date is greater than a specified value. I have thus far tried the following without success:

 

$filter=ModifiedOn%20gt%20datetime'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. Unrecognized 'Edm.String' literal 'datetime'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetime'2023-05-23T00:00:00.0000000Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetime'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetime'2023-05-23T00:00:00.0000000Z''.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20cast('2023-05-23T00:00:00.0000000Z','Edm.DateTimeOffset')

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. The binary operator GreaterThan is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.", "innererror": { "message": "The binary operator GreaterThan is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThan'.", "innererror": { "message": "A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThan'.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20datetimeoffset'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. Unrecognized 'Edm.String' literal 'datetimeoffset'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetimeoffset'2023-05-23T00:00:00.0000000Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetimeoffset'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetimeoffset'2023-05-23T00:00:00.0000000Z''.", "type": "", "stacktrace": "" } } }

 

Any suggestions for how to achieve this would be much appreciated. Thanks.

Like 0

Like

2 comments

This works for me

$filter=ModifiedOn gt 2024-05-14T00:00:00Z

I don't know if there is something specific for power automate, but in just accessing the Creatio odata api this is valid.

Ryan

Hello,

 

The correct way to format the filter in your OData request is by using the Edm.DateTimeOffset type directly, but the format should be specific. Here’s how you can do it:

https://website/yourentity?$filter=ModifiedOn gt 2023-05-23T00:00:00Z

Show all comments

Dear community, 

 

I have seen a wonderful example to post XML data to ODATA Service with POST method. I am looking into ODATA service with GET method. I am really need of it as my management is eagerly looking at me. please send the example as soon as you can.

Thanking you,

Inayatullla

 

Like 0

Like

1 comments

Hello,



Perhaps this article from the Academy will be helpful to you: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…



Best regards,

Malika

Show all comments

Hello.

How to attach a phone call to a contact and lead using odata3 or odata4?

Also is there a list of collection names?

Like 0

Like

1 comments

Hello,

The name of object collections corresponds to the object's name in Creatio (for Odata  4), and for Odata 3 - the name of the object +Collection (CallCollection).

 

The example requests are available here:

https://documenter.getpostman.com/view/10204500/SztHX5Qb?version=latest

Show all comments

I am trying to find the api list of this crm, I find the postman collection also, but unable to generate the access token

Like 1

Like

3 comments

Have you checked in here ? : Integrations & API | Creatio Academy

 

We are using the CREATIO API to get/update data from or into the CRM.

It works well.

 

Greetings,

 

Please use this documentation:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…



Regards,

Orkhan

Orkhan,

Here you have the Creatio API Doc ready to use 

https://documenter.getpostman.com/view/10204500/SztHX5Qb

 

Regards

Show all comments

Hello community,

 

I want to add data inside a section with the OData interface. I've already checked the documentation at https://documenter.getpostman.com/view/10204500/SztHX5Qb?version=latest and https://academy.creatio.com/docs/developer/integrations_and_api/data_se… but I have the following problem:



I am using a simple Python script to make the API requests in these steps:

 

1. Authenticate in the website using the Authentication method

This works nice using the credentials as payload inside the request.

 

2. Extract the cookie returned inside the header response.

From the test I've made, I need to extract the cookie parts UserName, BPMCSRF, .ASPXAUTH, BPMLOADER and append all of them inside a "Cookie" header like this example:

 

"Cookie: BPMLOADER=; UserType=General; UserName=; .ASPXAUTH=; BPMCSRF=;"

 

Everywhere I've checked inside the documentation it says that it is enough using a header called BPMCSRF with that value from the Set-Cookie response header, but in my case it fails using that value and I have to build the Cookie myself with the different values specified above.

 

3. Perform a POST request to a section like https://mycreatio.com/0/odata/Case

Here the request fails and I get an error 403 - Forbidden with the following message:

 

403 - Forbidden: Access is denied.

You do not have permission to view this directory or page using the credentials that you supplied.

 

And I don't understand why Creatio returns that error, because if I try doing a GET request to the same URL it returns the full list without any problem, but performing a POST request using the same cookie structure inside the headers doesn't return the expected inserted register.

 

Thanks in advance in for your help.

 

Regards.

Like 0

Like

3 comments

Just to clarify, in theory the issue is not related to user permissions as I have tried to insert registers with multiple users (one of them being Supervisor) and in multiple sections, but I always get the same error.

 

P.D. I am using OData 4

Hello Alejandro!

 

For correct requests, you need to use all cookies not "only a part". Also "BPMCSRF" must be used in cookies and as a separate parameter in the header as mentioned in the example here Creatio API (getpostman.com).

Please try and test it with the corresponding changes.

Hello Kyrylo,

 

Thank you very much for your help. In my case the problem was only with that "BPMCSRF" header that I was not building properly, for the cookie values that I have to pass inside the "Cookie" header I tried passing ALL the values extracted from the response header "Set-Cookie" but it didn't let me authenticate, so the solution that works for me is creating a cookie manually with only the values  UserName, UserType, BPMCSRF, .ASPXAUTH, BPMLOADER that I mentioned before.

 

The POST requests are working flawlessly now. I will try now to upload files using OData following the documentation and I would highly appreciate if you are able to help me again if I have trouble.

 

Thank you very much.

Show all comments

Hello community,

 

I want to get the attached files information from a given case inside my environment. As the primary section containing the information is case, I know that I can retrieve the case information from 

 

https://mycreatio.com/0/odata/Case

 

And the attached files can be extracted from 

 

https://mycreatio.com/0/odata/CaseFile

 

Where each element from the response has the format:

{
  "Id": "7bb283a4-2f30-7193-37f3-79c8465ceda4",
  "Name": "<value>",
  "CreatedOn": "<value>",
  "CreatedById": "<value>",
  "ModifiedOn": "<value>",
  "ModifiedById": "<value>",
  "ProcessListeners": 0,
  ...
  "Size": <value>,
  "CaseId": "<value>",
  "IsNeedToNotify": true,
  "SysFileStorageId": "<value>",
  "FileGroupId": "<value>",
  "Tag": "<value>"
},

As you may see there is a field "CaseId" which is used to link the file object to the case object.

 

The problem I have is that I want to get the list of files from a case only by the Case Id. I've tried many different approaches using the OData standard syntax like:

 

'">https://mycreatio.com/0/odata/CaseFile?$filter=CaseId eq '<value>'

 

But I always get an error when trying to access the resource. In the previous example, the error I get is related to the field data type. Creatio yells because the CaseId field is of type Guid but in the comparison I am using a string.

 

By the way, changing the query to:

 

'">https://mycreatio.com/0/odata/CaseFile?$filter=CaseId eq guid'<value>'

 

or

 

'">https://mycreatio.com/0/odata/CaseFile?$filter=CaseId eq <value>

 

Doesn't fix the issue.

 

Can you please help me with this query that I am struggling to do?

 

Regards

Like 0

Like

1 comments
Best reply

Rather than using CaseId, use Case/Id:

https://mycreatio.com/0/odata/CaseFile?$filter=Case/Id eq idvalue

Ryan

Rather than using CaseId, use Case/Id:

https://mycreatio.com/0/odata/CaseFile?$filter=Case/Id eq idvalue

Ryan

Show all comments

Dear mates,

We are adding to Creatio, our contacts from marketplaces with oData.

We are facing the following issue :

data are well integrated into Creatio, but if we look at the contact sheet, in the area on the top left, the telephone professional is not indicated even though it is present in the contact's communications fields. So in the contact details of the account, we do not directly see the contact's telephone number.

 

How can we add the phone to the contacts left panel in order to see the contact's telephone number directly on the accounts page ?

Thank you !

Nicolas

Like 1

Like

1 comments

Hello,



It`s seems to be an issue that our support should take a look. Please send us an email at support@creatio.com



Best regards,

Serhii

 

Show all comments

Hello Community,

 

I need to know if it is possible (and how to proceed if possible) to upload a file into Creatio (in this specific case an audio file) from an external application using OData connection in version 8.0.10. The file need to be uploaded into the attachments detail of a custom section.

 

Thank you!

Like 0

Like

1 comments

Hello Javier,

Regarding the general function of OData, you can find detailed information in the following resource:

 

OData Overview

 

For more specific examples and methods, you can refer to this documentation:

 

OData Methods and Examples

API for file management

Show all comments

I am getting a HTTP 403 (Forbidden) error when I call the OData $batch request on my developer instance.  It does not matter what requests I pass to it.  It also occurs when I use the example $batch request provided by the Creatio postman environment.

 

Do developer instances support batch requests?  Is there an option I can enable to allow batch requests?

Like 0

Like

4 comments
Best reply

Mobileforce Support,

 

The answer to the POST request to /AuthService.svc/Login will be a set of session cookies needed for further requests execution. One of those cookies (BPMSCRF cookie) values should be specified as a separate BPMCSRF header value for further POST\PUT\PATCH requests. So once you are authenticated via postman you need to copy the value of the received BPMCSRF cookie and set it as a header value for further requests in the following manner:

After that, you can try calling the OData endpoints via POST requests and they should succeed.







Thank you for contacting the Creatio technical support team. If you have any further questions, please send them as a reply to this email.



Thank you for choosing Creatio!

 

Hello, 

 

I've shared some documentation that will help you: 

 

OData | Creatio Academy



Best regards,

Orkhan

Orkhan,

Thanks, but I've already read the documentation and was able to get other OData calls to work successfully.  It is only the batch request is not working for me. 

 

Typically, a HTTP 403 error means that a user is trying to access a page or API that they do not have permission for.  Hence why I was asking whether there is some system configuration option I need to set.  I am trying to access this as the Supervisor user on my development instance.

 

Mobileforce Support,

 

The answer to the POST request to /AuthService.svc/Login will be a set of session cookies needed for further requests execution. One of those cookies (BPMSCRF cookie) values should be specified as a separate BPMCSRF header value for further POST\PUT\PATCH requests. So once you are authenticated via postman you need to copy the value of the received BPMCSRF cookie and set it as a header value for further requests in the following manner:

After that, you can try calling the OData endpoints via POST requests and they should succeed.







Thank you for contacting the Creatio technical support team. If you have any further questions, please send them as a reply to this email.



Thank you for choosing Creatio!

 

Orkhan,

Thanks, that was the issue.  I did not realize that the BPMCSRF cookie also had to passed in as HTTP header as well.

Show all comments

Hello Community,

Besides the built-in functionality for data import, I have seen in community posts the possibility to import data to Creatio from ODATA protocol.

Are there any examples regarding this feature, academy article, or what to know before implementing it?

Best regards,

Sasori

Like 1

Like

1 comments

Hello Sasori,

 

Regarding the general function of OData, you can find detailed information in the following resource:

OData Overview

 

For more specific examples and methods, you can refer to this documentation:

OData Methods and Examples

Show all comments