Hi
It would be nice to have in expression an UUID generator.
In your usecase, we genere UUID to create a correlation_ID and request_ID that we pass through connector function call in header to make support and investigation easier.
Nicolas
Hi
It would be nice to have in expression an UUID generator.
In your usecase, we genere UUID to create a correlation_ID and request_ID that we pass through connector function call in header to make support and investigation easier.
Nicolas
Hello Nicolas, totally agree with you as this is very useful and important for observability tools and frameworks.
If this can be made available in expressions that will be possible to use in apps, functions and automations it will be great!
Like the randomstring() this UUIDv4() could be present.
Thanks!
@Nicolas & @miguel.freitas
I wonder, why both of you didn’t upvote this suggestion yet ![]()
Tks! I had clicked but somehow not exactly! done!
Hey @Nicolas and @miguel.freitas, good use case, and I’ve added both of your notes to the ticket. One question so we size it right - does your system on the other end need an actual UUID (format checks, a UUID column, a tracing tool that expects one), or would any unique string work and UUID is the convention you follow? And Nicolas, how are you creating your correlation and request IDs today?
Hello @atrabuco, we are following UUID version 4 for our backend system when correlation ID is required.
You can find here more information Universally unique identifier - Wikipedia.
Regarding the RequestID, since this is to use together with SAP idempotency feature, this is a random 32 characters (a-z,0-9) that can be more flexible than UUIDv4 case for correlationID.
You can find the SAP feature here Defining Settings for Idempotent Services | SAP Help Portal.
So if you could add a few options:
UUIDv4
Random(x), where x is the number of characters for a random string + numbers up to 32 characters (similar to RANDOMSTRING() but more flexible on the size)
For the generation today we are doing a “big” expression with random digit pick from the hex list of possible chars (not optimal).
In addition, you can refer to:
Thanks @miguel.freitas, this is really helpful, and the SAP idempotency detail is exactly what I was looking for. I’ve added it to the ticket.
UUIDv4 looks like the right place to start. If we gave you a standard 36-character UUIDv4 (lowercase, with dashes), could you work with that for both your correlation ID and your request ID? SAP Gateway’s docs describe the RequestID header as a “32 character GUID string,” so for that one you’d probably need to remove the dashes. That already works in the expression editor with REGEX_REPLACE(<uuid>, "-", "", "g"), and UPPERCASE() is there too if SAP needs it.