Forum - hold_shelf_additional_id_regex

Tagged: ,

  • This topic has 5 replies, 2 voices, and was last updated 10 months ago by Dan Michael Heggø.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #52163
    Dan Michael Heggø
    Participant

    Do anyone know the format of hold_shelf_additional_id_regex used to format hold shelf IDs. The documentation is a bit terse.

    It mentions that the format is “s/regex/destination”, but doesn’t say which Regex dialect and what kind of capture group syntax is supported.

    #52166
    Dan Michael Heggø
    Participant

    The forum didn’t allow me to link to the documentation page, but it can be googled: “Configuring fullfilment”

    It mentions that the format is s/<regex>/<destination>, but doesn’t say which Regex dialect and what kind of capture group syntax is supported. My guess was that something like this would work:

    s/^(.{3}).*/$1

    to get the first three digits/characters (just an example), but it didn’t. I also tried things like

    s/.*/TEST

    and

    s/.*/TEST/

    Neither worked.

    #52184
    Tami Fuches
    Moderator

    Hi,
    The regex should be on the format of s//. In any case we cut the last 7 digits regardless the regex. For example:
    Regex = s/(\d{2})(\d+)(\d{2})/$1-$2-$3
    Will modify 88764510000521 to
    88-764-51
    By default, the id will be break by hyphen every three digits –
    887-645-1
    Alma first tries to use the customer regex (if defined). In case it is not defines or an error occurs during the parsing we use the default format of three digits.

    I hope this helps (and we will update documentation as well),
    Tamar

    #52187
    Dan Michael Heggø
    Participant

    Thanks a alot, got it working now! Btw., the reason none of my attempts worked was because of a proxy problem: I didn’t regenerate the letter XML after changing the regexp 🙂
    Silly indeed, but once you focus to much on one problem (the regexp formatting), it’s easy to forget thinking about other ones.

    • This reply was modified 11 months ago by Dan Michael Heggø.
    #52476
    Dan Michael Heggø
    Participant

    I forgot to ask about one important thing: how is the number generated?

    At first, we thought it was an incrementing number… until it decreased. On the other hand, it doesn’t seem to be a random number either. So what exactly is it?

    We’re discussing if we can chop off some digits to make it shorter, but we cannot do this safely without knowing how it’s generated.

    #52564
    Dan Michael Heggø
    Participant

    We found out ourselves: the “new” Additional Id is just the old Request Id.

    We’re not very happy with this solution, since it results in a hold shelf sorted by *request creation time*, which is not an ordering that makes any sense. In practice, they function as unique, random numbers.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.