# Artifacts

{% embed url="<https://www.youtube.com/watch?v=Vrjl-ISUaC8>" %}

An artifact is a key concept within sfp. An artifact is a point in time snapshot of a version of a package, as mentioned in sfdx-project.json . The snapshot contains source code of a package directory , additional metadata information regarding the particular version, changelog and other details. An artifact for 2GP package would also contain details such as [Subscriber Package Version ID](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_unlocked_pkg_pkg_ids.htm)

{% hint style="info" %}
In the context of sfp, packages are represented in your version control, and artifact is an output of a the build command when operated on a package
{% endhint %}

\
Artifacts provide an abstraction over version control, as it detaches the version control from from the point of releasing into a salesforce org. Almost all commands in sfp operates on an artifact or generates an artifact. \\

<div data-full-width="false"><figure><img src="https://1646267036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYLI5Ts7pWhWQV9UaBn3H%2Fuploads%2Fgit-blob-25a30abd0b35bacaae26320a61794efa7c7a7389%2Fimage.png?alt=media" alt="" width="563"><figcaption><p>An expansion of an artifact generated by sfp</p></figcaption></figure></div>

{% embed url="<https://medium.com/flxbl/simplify-your-salesforce-branching-strategy-915565e8efa6>" %}

{% embed url="<https://medium.com/flxbl/navigating-salesforce-deployment-strategies-artifact-vs-delta-deployments-e704824acea3>" %}

In the context of **sfp**, an **artifact** represents a more enhanced concept compared to a Salesforce package. While it is based on a Salesforce package or specific package types introduce by sfp, an artifact in sfp includes additional attributes and metadata that describe the package version, dependencies, installation behavior, and other context-specific information relevant to the CI/CD process. Artifacts in sfp are designed to be more than just a bundle of code and metadata; they encapsulate the package along with its CI/CD lifecycle information, making them more aligned with DevOps practices.\
\
sfp's artifacts are built to be compatible for npm package supported registries , most CI/CD providers provide a npm compatible registry to host these packages/artifacts. Here is the link to operate on Github Package Manager for instance (<https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry>)

Artifacts built by sfp follow a naming convention that starts with the \<name\_of\_the\_package>*sfpowerscripts\_artifact\_\<Major>.\<Minor>.\<Patch>-\<BuildNumber>.* One can use any of the npm commands to interact with sfp artifacts. \\
