11

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

16

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>
| improve this answer | |
  • 1
    thank you! have you had trouble deploying flows (visual flow or process builder) using ANT? it is giving us fits – user19156 Apr 30 '15 at 22:42
  • 1
    I have had some trouble deploying them through the Metadata API using Eclipse. – Adrian Larson May 7 '15 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 Jun 25 '15 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.

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

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.

| improve this answer | |
  • 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 – Baird Straughan Jun 18 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.