15

can anyone please help out with sample package.xml to retrieve process builder from salesforce org?
Thanks in advance

4 Answers 4

21

Processes from Process Builder have Flow metadata type. And you can retrieve all processes with next package.xml:

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>Flow</name>
    </types>
    <version>31.0</version>
</Package>
3
  • 2
    thank you! have you had trouble deploying flows (visual flow or process builder) using ANT? it is giving us fits
    – user19156
    Commented Apr 30, 2015 at 22:42
  • 1
    I have had some trouble deploying them through the Metadata API using Eclipse.
    – Adrian Larson
    Commented May 7, 2015 at 20:30
  • An easy way to view what metadata types are available and the members for a specific type of metadata, you can use workbench.developerforce.com and view the metadata for that environment. It's saved my skin countless times.
    – zainogj
    Commented Jun 25, 2015 at 16:35
8

I just thought it would be useful to mention how to retrieve a specific one as well, as there is a small caveat here. When just packaging a specific process you must append the API name with the version number you are importing. For example:

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>unique_name-3</members>
        <name>Flow</name>
    </types>
    <version>41.0</version>
</Package>

This will retrieve version 3 of the "unique_name" process. Without a version number appended you will get an error.

2
  • how is ths answer different fom the one provided below by @duminda?
    – glls
    Commented Mar 15, 2018 at 18:23
  • 2
    Yeah I agree this is a duplicate answer, although it provides more clear emphasis about versioning.
    – Adrian Larson
    Commented Mar 15, 2018 at 18:36
7

Just an update on this question - With the deployment of API Version 44, version numbers at the end of Process Builder Flows are no longer necessary when specifying individual flows.

1
  • You CAN still specify the version number, but if you do, the retrieved package will not have the version numbers in the process builder names in the zipped package, and so you'll have to edit the zipped package and add the "-6" or whatever to make the name in the zipped package match the name in the manifest. Otherwise, you'll see an error like this: package.xml (Update_Email_when_Preferred_changes-6) -- Error: An object 'Update_Email_when_Preferred_changes-6' of type Flow was named in package.xml, but was not found in zipped directory Commented Jun 18, 2020 at 17:56
4

You need to change your version to 33.0 or 34.0 in package.xml.
<version>34.0</version>
If not you can add a <processMetadataValues> section to your process builder meta data file.
Instead of <members>*</members>, provide the excact name of your process and active version number. <members>My-process-10</members>. Where "My-process" is the name of your process and "-10" is the active version.
Once you deploy a processes to the target org, you need to activate it manually.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .