JobIDs for any triggered emails (including Journey Builder sends) persist until a publish event.
To answer you questions specifically:
- Does JobID stays the same throughout the life of the journey?
Not necessarily
- Does JobID changes after sometime? if yes, on what basis?
New JobIDs are assigned for sends after a publish event occurs on the send definition
- How JobID is generated for a journey send?
It's no different than any other send
- How JobID can be used to show the total emails send for a journey series?
If you retrieve the aggregated Send SOAP object you can see the progression. Here's the script I use for doing that. You can use this data to join back to the _Journey
and _JourneyActivity
data views to associate the sends to a specific journey.
Here's a query that illustrates the connection between the journey data and the send job:
Journey Jobs
select
j.jobid
, j.emailName
, jn.journeyName
, jn.versionNumber
from _Job j
inner join _JourneyActivity ja on ja.JourneyActivityObjectID = j.TriggererSendDefinitionObjectID
inner join _Journey jn on jn.VersionID = ja.VersionID
where 1=1
and convert(varchar(36),ja.JourneyActivityObjectID) != '00000000-0000-0000-0000-000000000000'
and isnull(ja.ActivityName,'') != ''