How to add unique identifier to each submission? In short, I am trying to figure out how to add a custom and unique identifier to each submission from the Webform module. 

Example: User fills out the Webform and submits. User then receives an email (email is captured from email field in Webform) confirming their submission and providing them with a Unique Identifier (ABC-14-001). 

I know Webform asks what number to start the next submission (and I'm assuming this is considered the "SID"). If I am to utilize the SID, I need to be able to append the custom "ABC-14" prefix to each submission's SID. 

I'm not very familiar with hooks (sorry for the ignorance), but I understand that hooks might be the only way, or at least most effective way, to accomplish this?

Update
Thanks all who responded! I have a working solution right now with this module:

function identifier_webform_submission_presave($node, &amp;$submission) 
{
  $component_id = 23; //that's your hidden field
  $submission-&gt;data[$component_id][0] = 'Text to be inserted';
}
You want to use hook_webform_submission_presave to record your special key. I would create a hidden textfield in the Webform that is optional so the value can be set by your PHP code upon submission.

For a basically full working example see Webform Issue #1964080.

To create your special value such as AB-001-12345 you just make a php function that creates a random string, or a string to your specifications:

function generate_special_submission_key() {
  $length = 10;
  $str = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
  return $str;
}